gcc/libgomp/testsuite
Frederik Harwath 5d183d1740 Warn about inconsistent OpenACC nested reduction clauses
OpenACC (cf. OpenACC 2.7, section 2.9.11. "reduction clause";
	this was first clarified by OpenACC 2.6) requires that, if a
	variable is used in reduction clauses on two nested loops, then
	there must be reduction clauses for that variable on all loops
	that are nested in between the two loops and all these reduction
	clauses must use the same operator.
	This commit introduces a check for that property which reports
	warnings if it is violated.

	2019-11-06  Gergö Barany  <gergo@codesourcery.com>
	            Frederik Harwath  <frederik@codesourcery.com>
	            Thomas Schwinge  <thomas@codesourcery.com>

	gcc/
	* omp-low.c (struct omp_context): New fields
	local_reduction_clauses, outer_reduction_clauses.
	(new_omp_context): Initialize these.
	(scan_sharing_clauses): Record reduction clauses on OpenACC constructs.
	(scan_omp_for): Check reduction clauses for incorrect nesting.
	gcc/testsuite/
	* c-c++-common/goacc/nested-reductions-warn.c: New test.
	* c-c++-common/goacc/nested-reductions.c: New test.
	* gfortran.dg/goacc/nested-reductions-warn.f90: New test.
	* gfortran.dg/goacc/nested-reductions.f90: New test.
	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-1.c:
	Add expected warnings about missing reduction clauses.
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-2.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-3.c:
	Likewise.
	* testsuite/libgomp.oacc-c-c++-common/par-loop-comb-reduction-4.c:
	Likewise.

	Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>

From-SVN: r277875
2019-11-06 10:43:52 +00:00
..
config
lib [libgomp] In OpenACC testing, by default only build for the offload target that we're actually going to test 2019-02-22 11:51:35 +01:00
libgomp.c re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-28 12:13:21 +02:00
libgomp.c-c++-common tree.def (OMP_LOOP): New tree code. 2019-07-20 13:21:42 +02:00
libgomp.c++ re PR libgomp/91530 (Several libgomp.*/scan-* tests FAIL without avx_runtime) 2019-08-27 12:45:55 +02:00
libgomp.fortran libgomp - remove dg-run if dg-options O2 is used 2019-11-04 14:18:50 +01:00
libgomp.graphite
libgomp.hsa.c
libgomp.oacc-c [libgomp] In OpenACC testing, by default only build for the offload target that we're actually going to test 2019-02-22 11:51:35 +01:00
libgomp.oacc-c-c++-common Warn about inconsistent OpenACC nested reduction clauses 2019-11-06 10:43:52 +00:00
libgomp.oacc-c++ Test cases to verify OpenACC 'firstprivate' mappings 2019-06-19 00:15:03 +02:00
libgomp.oacc-fortran libgomp/testsuite - use unique numbers with Fortran's 'stop' 2019-11-04 11:01:22 +01:00
libgomp-test-support.exp.in
Makefile.am Generalize getconf _NPROCESSORS_ONLN 2019-05-30 09:06:48 +00:00
Makefile.in Generalize getconf _NPROCESSORS_ONLN 2019-05-30 09:06:48 +00:00