> -----Original Message-----
> From: Prathamesh Kulkarni <[email protected]>
> Sent: 20 January 2026 09:48
> To: Tobias Burnus <[email protected]>; Matthew Malcomson
> <[email protected]>; [email protected]; Jakub Jelinek
> <[email protected]>
> Cc: Thomas Schwinge <[email protected]>; Andrew Stubbs
> <[email protected]>; Tom de Vries <[email protected]>; Sebastian Huber
> <[email protected]>
> Subject: RE: [PATCH 2/5] libgomp: Ensure memory sync after performing
> tasks
> 
> External email: Use caution opening links or attachments
> 
> 
> > -----Original Message-----
> > From: Tobias Burnus <[email protected]>
> > Sent: 20 January 2026 02:39
> > To: Prathamesh Kulkarni <[email protected]>; Matthew Malcomson
> > <[email protected]>; [email protected]; Jakub Jelinek
> > <[email protected]>
> > Cc: Thomas Schwinge <[email protected]>; Andrew Stubbs
> > <[email protected]>; Tom de Vries <[email protected]>; Sebastian Huber
> > <[email protected]>
> > Subject: Re: [PATCH 2/5] libgomp: Ensure memory sync after
> performing
> > tasks
> >
> > External email: Use caution opening links or attachments
> >
> >
> > Hi Prathamesh,
> >
> > Prathamesh Kulkarni wrote:
> > > The attached patch similarly adds target pragmas to the test as
> > previous patch.
> > > Does it look OK ?
> >
> > Thanks for revising Matthew's patch.
> >
> > Yes, LGTM. – However, except for 'Daily bump.', it seems to be
> > uncommon to have a '.' at the end of the first line (summary) of the
> > git commit; hence, consider removing it.
> Thanks, adjusted the commit summary and committed to trunk in:
> https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=304d08fea9e68c5b48065328
> 16b58d33a15a917d
Hi Tobias,
Sorry I messed up the newly added test (pr122356.c) while committing, and 
Linaro CI reported the test failing:
https://linaro.atlassian.net/browse/GNU-1822

This happens because full_data is not initialized to 0 on second call to test() 
on host, which results in call to abort.
The attached patch modifies pr122356.c (and similarly pr122314.c) to initialize 
full_data to 0 at beginning of test().

With patch, running make check-target-libgomp RUNTESTFLAGS="c.exp=pr122356.c" 
shows:

                === libgomp Summary ===
# of expected passes            2

OK to commit ?

Thanks,
Prathamesh
> 
> Thanks,
> Prathamesh
> >
> > Tobias

libgomp: Update tests to initialize full_data to 0.

libgomp/ChangeLog:
        * libgomp/testsuite/libgomp.c/pr122314.c (test): Initialize full_data
        to 0.
        * libgomp/testsuite/libgomp.c/pr122356.c: Likewise.

Signed-off-by: Prathamesh Kulkarni [email protected]

diff --git a/libgomp/testsuite/libgomp.c/pr122314.c 
b/libgomp/testsuite/libgomp.c/pr122314.c
index bb9565de726..47c633f73b7 100644
--- a/libgomp/testsuite/libgomp.c/pr122314.c
+++ b/libgomp/testsuite/libgomp.c/pr122314.c
@@ -9,6 +9,9 @@ unsigned full_data[NUM_THREADS] = {0};
 void
 test ()
 {
+  for (int i = 0; i < NUM_THREADS; i++)
+    full_data[i] = 0;
+
 #pragma omp parallel num_threads(8)
   {
 #pragma omp barrier
diff --git a/libgomp/testsuite/libgomp.c/pr122356.c 
b/libgomp/testsuite/libgomp.c/pr122356.c
index 76879511ff2..9ac3ab87948 100644
--- a/libgomp/testsuite/libgomp.c/pr122356.c
+++ b/libgomp/testsuite/libgomp.c/pr122356.c
@@ -9,6 +9,9 @@ unsigned full_data[NUM_THREADS] = {0};
 void
 test ()
 {
+  for (int i = 0; i < NUM_THREADS; i++)
+    full_data[i] = 0;
+
 #pragma omp parallel num_threads(8)
   {
 #pragma omp for

Reply via email to