diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-09-16 11:04:19 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-09-16 12:16:11 -0700 |
commit | 8155316c6fc23045e8e056e91449a6e9863c357f (patch) | |
tree | eb49f081f6ba90d0eda09fd14b4861a1af0ac019 /gcc/cp/ChangeLog-1997 | |
parent | d1339b519ae8cc4ae550baa127a21d8350462837 (diff) | |
download | gcc-8155316c6fc23045e8e056e91449a6e9863c357f.zip gcc-8155316c6fc23045e8e056e91449a6e9863c357f.tar.gz gcc-8155316c6fc23045e8e056e91449a6e9863c357f.tar.bz2 |
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.
Diffstat (limited to 'gcc/cp/ChangeLog-1997')
0 files changed, 0 insertions, 0 deletions