summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2021-03-12 09:02:41 -0800
committerNathan Sidwell <nathan@acm.org>2021-03-12 10:23:05 -0800
commit6e885ad3287388192e52e9b524dbaa408507c0a4 (patch)
tree7e95fc65bdaa8414b29907489f09ec61cff00f9f /libgfortran
parentd8b84e2771fc2495493d0c66c3cba714484757d7 (diff)
downloadgcc-6e885ad3287388192e52e9b524dbaa408507c0a4.tar.gz
c++: ICE with using-decl [PR 99238]
This ICE was caused by a stray TREE_VISITED marker. The lookup machinery was leaving it there due to the way I'd arranged for it to be cleared. That was presuming the name_lookup::value field didn't change, and that wasn't always true in the using-decl processing. I took the opportunity to break out a helper, and then call it immediately after lookups, rather than wait until destructor time. Added some asserts the module machinery to catch further cases of this. PR c++/99238 gcc/cp/ * module.cc (depset::hash::add_binding_entity): Assert not visited. (depset::add::add_specializations): Likewise. * name-lookup.c (name_lookup::dedup): New. (name_lookup::~name_lookup): Assert not deduping. (name_lookup::restore_state): Likewise. (name_lookup::add_overload): Replace outlined code with dedup call. (name_lookup::add_value): Likewise. (name_lookup::search_namespace_only): Likewise. (name_lookup::adl_namespace_fns): Likewise. (name_lookup::adl_class_fns): Likewise. (name_lookup::search_adl): Likewise. Add clearing dedup call. (name_lookup::search_qualified): Likewise. (name_lookup::search_unqualified): Likewise. gcc/testsuite/ * g++.dg/modules/pr99238.h: New. * g++.dg/modules/pr99238_a.H: New. * g++.dg/modules/pr99238_b.H: New.
Diffstat (limited to 'libgfortran')
0 files changed, 0 insertions, 0 deletions