[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 --- Comment #4 from Alexandre Oliva --- Author: aoliva Date: Thu Dec 6 23:18:30 2018 New Revision: 266874 URL: https://gcc.gnu.org/viewcvs?rev=266874=gcc=rev Log: [PR86397] resolve nondependent noexcept specs early in C++1[14] build_noexcept_spec refrained from resolving nondependent noexcept expressions when they were not part of the function types (C++ 11 and 14). This caused problems during mangling: canonical_eh_spec, when called on the template function type, would find an unresolved but not explicitly deferred expression, and nothrow_spec_p would reject it. We could relax the mangling logic to skip canonical_eh_spec, but since -Wnoexcept-type warns when mangling function names that change as noexcept specs become part of types and of mangling in C++17, and the test at mangling time may give incorrect results if the spec is not resolved, we might as well keep things simple and resolve nondependent noexcept specs sooner rather than later. This is what this patch does. for gcc/cp/ChangeLog PR c++/86397 * except.c (build_noexcept_spec): Resolve nondependent expressions. for gcc/testsuite/ChangeLog PR c++/86397 * g++.dg/cpp0x/pr86397-1.C: New. * g++.dg/cpp0x/pr86397-2.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp0x/pr86397-1.C trunk/gcc/testsuite/g++.dg/cpp0x/pr86397-2.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/except.c trunk/gcc/testsuite/ChangeLog
[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 Richard Biener changed: What|Removed |Added Target Milestone|7.4 |7.5
[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 --- Comment #3 from Alexandre Oliva --- https://gcc.gnu.org/ml/gcc-patches/2018-11/msg01970.html
[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 Alexandre Oliva changed: What|Removed |Added Status|NEW |ASSIGNED CC||aoliva at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org --- Comment #2 from Alexandre Oliva --- Created attachment 45062 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45062=edit candidate patch
[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2018-07-09 CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. Started with r244575.
[Bug c++/86397] [7/8/9 Regression] g++ ICE at on valid code in nothrow_spec_p, at cp/except.c:1158
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86397 Richard Biener changed: What|Removed |Added Keywords||ice-on-valid-code Priority|P3 |P2 Known to work||6.1.0 Version|unknown |8.1.0 Target Milestone|--- |7.4 Summary|g++ ICE at on valid code in |[7/8/9 Regression] g++ ICE |nothrow_spec_p, at |at on valid code in |cp/except.c:1158|nothrow_spec_p, at ||cp/except.c:1158 Known to fail||7.3.1, 8.1.1, 9.0