[Openmp-commits] [openmp] [OpenMP][libomptarget][Fix] Add missing array initialization (PR #76457)

Gheorghe-Teodor Bercea via Openmp-commits openmp-commits at lists.llvm.org
Wed Dec 27 09:47:10 PST 2023


https://github.com/doru1004 created https://github.com/llvm/llvm-project/pull/76457

Add missing array initialization

>From 70fb10ffde1ca1312c5e3b81877ff87edf43f1a3 Mon Sep 17 00:00:00 2001
From: Doru Bercea <doru.bercea at amd.com>
Date: Wed, 27 Dec 2023 12:44:20 -0500
Subject: [PATCH] Add missing array initialization.

---
 .../test/offloading/struct_mapping_with_pointers.cpp             | 1 +
 1 file changed, 1 insertion(+)

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