aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2024-03-15 09:23:28 -0400
committerMarek Polacek <polacek@redhat.com>2024-03-25 18:20:55 -0400
commit8651991fe2ea90a7276e91673b15b5c3865f14d7 (patch)
treeea04b3f801fc2a7b9cf97fb0b0bf58878dbf5e44 /libgcc
parentde0886d48032332d10e4acb5d15c8789b281b6fe (diff)
downloadgcc-8651991fe2ea90a7276e91673b15b5c3865f14d7.zip
gcc-8651991fe2ea90a7276e91673b15b5c3865f14d7.tar.gz
gcc-8651991fe2ea90a7276e91673b15b5c3865f14d7.tar.bz2
c++: ICE with noexcept and local specialization, again [PR114349]
Patrick noticed that my r14-9339-gdc6c3bfb59baab patch is wrong; we're dealing with a noexcept-spec there, not a noexcept-expr, so setting cp_noexcept_operand et al is incorrect. Back to the drawing board then. To fix noexcept84.C, we should probably avoid doing push_to_top_level in certain cases. maybe_push_to_top_level didn't work here as-is, so I changed it to not push to top level if decl_function_context is non-null, when we are not dealing with a lambda. This also fixes c++/114349, introduced by r14-9339. PR c++/114349 gcc/cp/ChangeLog: * name-lookup.cc (maybe_push_to_top_level): For a non-lambda, don't push to top level if decl_function_context is non-null. * pt.cc (maybe_instantiate_noexcept): Use maybe_push_to_top_level. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/noexcept85.C: New test. * g++.dg/cpp0x/noexcept86.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions