[PR87768] reset location wrapper suppression when reentering top level
Concepts-checking and other kinds of early tsubsting may often take
place while location wrappers are suppressed, e.g. because we've
triggered template instantiation within template parameter lists.
With that, exprs that are usually wrapped by VIEW_CONVERT_EXPRs
location wrappers may end up wrapped by NON_LVALUE_EXPRs that are not
marked as location wrappers. If such NON_LVALUE_EXPRs tsubsted exprs
undergo another round of tsubsting, say for constraint checking, or
even for another round of specialization, they will be rejected by
tsubst_copy_and_build.
This patch arranges for suppress_location_wrappers to be saved and
reset when pushing to the top level, and restored when popping from
it.
for gcc/cp/ChangeLog
PR c++/87768
* cp-tree.h (saved_scope): Add suppress_location_wrappers.
* name-lookup.c (do_push_to_top_level): Save and reset it.
(do_pop_from_top_level): Restore it.
for gcc/testsuite/ChangeLog
PR c++/87768
* g++.dg/concepts/pr87768.C: New.
From-SVN: r268006