[Openmp-commits] [openmp] a01b58a - [OpenMP][libomptarget][Fix] Add missing array initialization (#76457)
via Openmp-commits
openmp-commits at lists.llvm.org
Wed Dec 27 09:58:45 PST 2023
Author: Gheorghe-Teodor Bercea
Date: 2023-12-27T12:58:41-05:00
New Revision: a01b58aef0e42fb1b52e358adf4c56678a884d37
URL: https://github.com/llvm/llvm-project/commit/a01b58aef0e42fb1b52e358adf4c56678a884d37
DIFF: https://github.com/llvm/llvm-project/commit/a01b58aef0e42fb1b52e358adf4c56678a884d37.diff
LOG: [OpenMP][libomptarget][Fix] Add missing array initialization (#76457)
Add missing array initialization as the array was not initialized and
the value zero was assumed.
Added:
Modified:
openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp b/openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp
index befed120ca1385..f0fde50889dace 100644
--- a/openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp
+++ b/openmp/libomptarget/test/offloading/struct_mapping_with_pointers.cpp
@@ -29,6 +29,7 @@ int main() {
dat.datum[7] = 7;
dat.more_datum[17] = 17;
+ dat.datum[dat.arr[0][0]] = 0;
/// The struct is mapped with type 0x0 when the pointer fields are mapped.
/// The struct is also map explicitely by the user. The second mapping by
More information about the Openmp-commits
mailing list