diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-02-17 05:33:45 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-02-17 05:41:37 -0800 |
commit | 24bf79f1798ad1d64812709001d2d11cd3e6849f (patch) | |
tree | c7501157810903d8c2a6afae46e2d83fb0542469 /gcc/fortran/trans-openmp.c | |
parent | d46c7e2c546b26d036856cf570694b832d3b1f54 (diff) | |
download | gcc-24bf79f1798ad1d64812709001d2d11cd3e6849f.zip gcc-24bf79f1798ad1d64812709001d2d11cd3e6849f.tar.gz gcc-24bf79f1798ad1d64812709001d2d11cd3e6849f.tar.bz2 |
c++: More set_identifier_type_value fixing [PR 99116]
My recent change looked under template_parms in two places, but that
was covering up a separate problem. We were attempting to set the
identifier_type_value of a template_parm into the template_parm
scope. The peeking stopped us doing that, but confused poplevel,
leaving an identifier value lying around. This fixes the underlying
problem in do_pushtag -- we only need to set the identifier_type_value
directly when we're in a template_parm scope (a later pushdecl will
push the actual template_decl). for non-class non-template-parm
bindings do_pushdecl already ends up manipulating
identifier_type_value correctly.
PR c++/99116
gcc/cp/
* name-lookup.c (do_pushdecl): Don't peek under template_parm
bindings here ...
(set_identifier_type_value_with_scope): ... or here.
(do_pushtag): Only set_identifier_type_value_with_scope at
non-class template parm scope, and use parent scope.
gcc/testsuite/
* g++.dg/lookup/pr99116-1.C: New.
* g++.dg/lookup/pr99116-2.C: New.
Diffstat (limited to 'gcc/fortran/trans-openmp.c')
0 files changed, 0 insertions, 0 deletions