gcc/libgomp/testsuite
Nathan Sidwell 8155316c6f c++: local-scope OMP UDR reductions have no template head
This corrects the earlier problems with removing the template header
from local omp reductions.  And it uncovered a latent bug.  When we
tsubst such a decl, we immediately tsubst its body.
cp_check_omp_declare_reduction gets a success return value to gate
that instantiation.

udr-2.C got a further error, as the omp checking machinery doesn't
appear to turn the reduction into an error mark when failing.  I
didn't dig into that further.  udr-3.C appears to have been invalid
and accidentally worked.

	gcc/cp/
	* cp-tree.h (cp_check_omp_declare_reduction): Return bool.
	* semantics.c (cp_check_omp_declare_reduction): Return true on for
	success.
	* pt.c (push_template_decl_real): OMP reductions do not get a
	template header.
	(tsubst_function_decl): Remove special casing for local decl omp
	reductions.
	(tsubst_expr): Call instantiate_body for a local omp reduction.
	(instantiate_body): Add nested_p parm, and deal with such
	instantiations.
	(instantiate_decl): Reject FUNCTION_SCOPE entities, adjust
	instantiate_body call.
	gcc/testsuite/
	* g++.dg/gomp/udr-2.C: Add additional expected error.
	libgomp/
	* testsuite/libgomp.c++/udr-3.C: Add missing ctor.
2020-09-16 12:16:11 -07:00
..
config
lib Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00
libgomp.c openmp: Add support for non-rectangular loops in taskloop construct 2020-08-13 09:06:05 +02:00
libgomp.c-c++-common [libgomp, nvptx] Add __sync_compare_and_swap_16 2020-09-14 08:28:56 +02:00
libgomp.c++ c++: local-scope OMP UDR reductions have no template head 2020-09-16 12:16:11 -07:00
libgomp.fortran OpenMP/Fortran: Fix (re)mapping of allocatable/pointer arrays [PR96668] 2020-09-15 09:24:47 +02:00
libgomp.graphite
libgomp.oacc-c [testsuite] Unset 'offload_target' after use 2020-07-24 14:00:43 +02:00
libgomp.oacc-c-c++-common openacc: Fix atomic_capture-2.c iteration-ordering issues 2020-09-08 13:26:42 -07:00
libgomp.oacc-c++ [testsuite] Unset 'offload_target' after use 2020-07-24 14:00:43 +02:00
libgomp.oacc-fortran openacc: Fix race condition in Fortran loop collapse tests 2020-09-08 13:26:42 -07:00
libgomp-site-extra.exp.in
libgomp-test-support.exp.in
Makefile.am
Makefile.in Removal of HSA offloading from gcc and libgomp 2020-08-03 18:13:00 +02:00