[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 --- Comment #4 from GCC Commits --- The trunk branch has been updated by Marek Polacek : https://gcc.gnu.org/g:dc6c3bfb59baab28b998e18396c06087b6d9b0ed commit r14-9339-gdc6c3bfb59baab28b998e18396c06087b6d9b0ed Author: Marek Polacek Date: Tue Mar 5 13:33:10 2024 -0500 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.
[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 Marek Polacek changed: What|Removed |Added Priority|P3 |P2 Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org Status|NEW |ASSIGNED CC||mpolacek at gcc dot gnu.org
[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 --- Comment #3 from Yves Bailly --- Due credits to Stefano Bellotti for writing the code that triggers the ICE - I only did the paperwork.
[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 Patrick Palka changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=91378 CC||ppalka at gcc dot gnu.org Keywords|needs-bisection | --- Comment #2 from Patrick Palka --- Started with r10-2274-gd40e36310722e6
[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2024-02-26 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed, reduced further: ``` template constexpr void test() { constexpr bool is_yes = yes_or_no; struct S { constexpr S() noexcept(is_yes){} }; S s; } int main() { test(); } ```
[Bug c++/114114] [11/12/13/14 Regression] Internal compiler error on function-local conditional noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114114 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.5 Summary|Internal compiler error on |[11/12/13/14 Regression] |function-local conditional |Internal compiler error on |noexcept|function-local conditional ||noexcept Known to fail||10.1.0, 9.3.0, 9.5.0 Known to work||9.1.0, 9.2.0