aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2022-07-11 09:33:19 +0200
committerThomas Schwinge <thomas@codesourcery.com>2022-07-11 11:23:33 +0200
commit06b2a2abe26554c6f9365676683d67368cbba206 (patch)
treea01d98b250ff10e44f48dafe771d882dcdb75240 /libgomp
parent4c94382a132a4b2b9d020806549a006fa6764d1b (diff)
downloadgcc-06b2a2abe26554c6f9365676683d67368cbba206.zip
gcc-06b2a2abe26554c6f9365676683d67368cbba206.tar.gz
gcc-06b2a2abe26554c6f9365676683d67368cbba206.tar.bz2
Enhance '_Pragma' diagnostics verification in OMP C/C++ test cases
Follow-up to recent commit 0587cef3d7962a8b0f44779589ba2920dd3d71e5 "c: Fix location for _Pragma tokens [PR97498]". gcc/testsuite/ * c-c++-common/gomp/pragma-3.c: Enhance '_Pragma' diagnostics verification. * c-c++-common/gomp/pragma-5.c: Likewise. libgomp/ * testsuite/libgomp.oacc-c-c++-common/reduction-5.c: Enhance '_Pragma' diagnostics verification.
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c
index 16aa0dd..7209460 100644
--- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c
+++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c
@@ -17,7 +17,7 @@ const int n = 100;
#define check_reduction(gwv_par, gwv_loop) \
{ \
s1 = 2; s2 = 5; \
-DO_PRAGMA (acc parallel gwv_par copy (s1, s2)) \
+DO_PRAGMA (acc parallel gwv_par copy (s1, s2)) /* { dg-line DO_PRAGMA_loc } */ \
DO_PRAGMA (acc loop gwv_loop reduction (+:s1, s2)) \
for (i = 0; i < n; i++) \
{ \
@@ -45,8 +45,10 @@ main (void)
/* Nvptx targets require a vector_length or 32 in to allow spinlocks with
gangs. */
- check_reduction (num_workers (nw) vector_length (vl), worker);
- /* { dg-warning "region is vector partitioned but does not contain vector partitioned code" "test1" { target *-*-* } pragma_loc } */
+ check_reduction (num_workers (nw) vector_length (vl), worker); /* { dg-line check_reduction_loc }
+ /* { dg-warning "22:region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } pragma_loc }
+ { dg-note "1:in expansion of macro 'DO_PRAGMA'" "" { target *-*-* } DO_PRAGMA_loc }
+ { dg-note "3:in expansion of macro 'check_reduction'" "" { target *-*-* } check_reduction_loc } */
check_reduction (vector_length (vl), vector);
check_reduction (num_gangs (ng) num_workers (nw) vector_length (vl), gang
worker vector);