diff options
author | Marek Polacek <polacek@redhat.com> | 2024-03-05 13:33:10 -0500 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2024-03-06 11:47:10 -0500 |
commit | dc6c3bfb59baab28b998e18396c06087b6d9b0ed (patch) | |
tree | 0c23621cbd31456e673e056305fddaea69a36690 /gcc/system.h | |
parent | e772c0c05c36d0b0539effb4256be67bbedd77fb (diff) | |
download | gcc-dc6c3bfb59baab28b998e18396c06087b6d9b0ed.zip gcc-dc6c3bfb59baab28b998e18396c06087b6d9b0ed.tar.gz gcc-dc6c3bfb59baab28b998e18396c06087b6d9b0ed.tar.bz2 |
c++: ICE with noexcept and local specialization [PR114114]
Here we ICE because we call register_local_specialization while
local_specializations is null, so
local_specializations->put ();
crashes on null this. It's null since maybe_instantiate_noexcept calls
push_to_top_level which creates a new scope. Normally, I would have
guessed that we need a new local_specialization_stack. But here we're
dealing with an operand of a noexcept, which is an unevaluated operand,
and those aren't registered in the hash map. maybe_instantiate_noexcept
wasn't signalling that it's substituting an unevaluated operand though.
PR c++/114114
gcc/cp/ChangeLog:
* pt.cc (maybe_instantiate_noexcept): Save/restore
cp_unevaluated_operand, c_inhibit_evaluation_warnings, and
cp_noexcept_operand around the tsubst_expr call.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/noexcept84.C: New test.
Diffstat (limited to 'gcc/system.h')
0 files changed, 0 insertions, 0 deletions