gcc/libgomp/testsuite
Tobias Burnus 1c101fcfaa 'omp scan' struct block seq update for OpenMP 5.x
While OpenMP 5.0 required a single structured block before and after the
'omp scan' directive, OpenMP 5.1 changed this to a 'structured block sequence,
denoting 2 or more executable statements in OpenMP 5.1 (whoops!) and zero or
more in OpenMP 5.2. This commit updates C/C++ to accept zero statements (but
till requires the '{' ... '}' for the final-loop-body) and updates Fortran
to accept zero or more than one statements.

If there is no preceeding or succeeding executable statement, a warning is
shown.

gcc/c/ChangeLog:

	* c-parser.cc (c_parser_omp_scan_loop_body): Handle
	zero exec statements before/after 'omp scan'.

gcc/cp/ChangeLog:

	* parser.cc (cp_parser_omp_scan_loop_body): Handle
	zero exec statements before/after 'omp scan'.

gcc/fortran/ChangeLog:

	* openmp.cc (gfc_resolve_omp_do_blocks): Handle zero
	or more than one exec statements before/after 'omp scan'.
	* trans-openmp.cc (gfc_trans_omp_do): Likewise.

libgomp/ChangeLog:

	* testsuite/libgomp.c-c++-common/scan-1.c: New test.
	* testsuite/libgomp.c/scan-23.c: New test.
	* testsuite/libgomp.fortran/scan-2.f90: New test.

gcc/testsuite/ChangeLog:

	* g++.dg/gomp/attrs-7.C: Update dg-error/dg-warning.
	* gfortran.dg/gomp/loop-2.f90: Likewise.
	* gfortran.dg/gomp/reduction5.f90: Likewise.
	* gfortran.dg/gomp/reduction6.f90: Likewise.
	* gfortran.dg/gomp/scan-1.f90: Likewise.
	* gfortran.dg/gomp/taskloop-2.f90: Likewise.
	* c-c++-common/gomp/scan-6.c: New test.
	* gfortran.dg/gomp/scan-8.f90: New test.
2023-04-25 16:29:14 +02:00
..
config Update copyright years. 2023-01-16 11:52:17 +01:00
lib OpenMP: Generate SIMD clones for functions with "declare target" 2022-11-25 18:13:22 +00:00
libgomp.c 'omp scan' struct block seq update for OpenMP 5.x 2023-04-25 16:29:14 +02:00
libgomp.c++ openmp: Fix up finish_omp_target_clauses [PR108286] 2023-01-05 11:57:30 +01:00
libgomp.c-c++-common 'omp scan' struct block seq update for OpenMP 5.x 2023-04-25 16:29:14 +02:00
libgomp.fortran 'omp scan' struct block seq update for OpenMP 5.x 2023-04-25 16:29:14 +02:00
libgomp.graphite Update copyright years. 2023-01-16 11:52:17 +01:00
libgomp.oacc-c [testsuite] Unset 'offload_target' after use 2020-07-24 14:00:43 +02:00
libgomp.oacc-c++ OpenMP/OpenACC struct sibling list gimplification extension and rework 2022-09-14 13:59:55 +00:00
libgomp.oacc-c-c++-common testsuite: Fix weak_undefined handling on Darwin 2023-03-28 10:40:05 +02:00
libgomp.oacc-fortran Add '-Wno-complain-wrong-lang', and use it in 'gcc/testsuite/lib/target-supports.exp:check_compile' and elsewhere 2023-02-22 09:19:51 +01:00
libgomp-site-extra.exp.in libgomp/test: Remove a build sysroot fix regression 2020-04-06 23:32:45 +01:00
libgomp-test-support.exp.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00
Makefile.am libgomp/test: Remove a build sysroot fix regression 2020-04-06 23:32:45 +01:00
Makefile.in libgomp nvptx plugin: Remove '--with-cuda-driver=[...]' etc. configuration option 2022-06-10 17:08:57 +02:00