[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 --- Comment #6 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:bce54ed494fd0e61f41986e2bdbcfb2d2a3a1cf1 commit r10-8016-gbce54ed494fd0e61f41986e2bdbcfb2d2a3a1cf1 Author: Jason Merrill Date: Tue Apr 28 12:27:27 2020 -0400 c++: Redeclaration of implicit operator== [PR94583] My last patch rejected a namespace-scope declaration of the implicitly-declared friend operator== before the class, but redeclaring it after the class should be OK. gcc/cp/ChangeLog 2020-04-28 Jason Merrill PR c++/94583 * decl.c (use_eh_spec_block): Check nothrow type after DECL_DEFAULTED_FN. * pt.c (maybe_instantiate_noexcept): Call synthesize_method for DECL_MAYBE_DELETED fns here. * decl2.c (mark_used): Not here. * method.c (get_defaulted_eh_spec): Reject DECL_MAYBE_DELETED here.
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Jason Merrill --- Fixed.
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 --- Comment #4 from CVS Commits --- The master branch has been updated by Jason Merrill : https://gcc.gnu.org/g:352811870d7d7edcca109ef50822e26ca7ef2b36 commit r10-7957-g352811870d7d7edcca109ef50822e26ca7ef2b36 Author: Jason Merrill Date: Fri Apr 24 16:27:26 2020 -0400 c++: implicit operator== with previous decl [PR94583] P2085 clarified that a defaulted comparison operator must be the first declaration of the function. Rejecting that avoids the ICE trying to compare the noexcept-specifications. gcc/cp/ChangeLog 2020-04-24 Jason Merrill PR c++/94583 * decl.c (redeclaration_error_message): Reject defaulted comparison operator that has been previously declared.
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 Richard Biener changed: What|Removed |Added Priority|P1 |P2 --- Comment #3 from Richard Biener --- While it is a regression on the development "branch" it is a rejects-valid (not implemented in GCC 9) -> ice-on-valid "regression" only as far as the GCC 10 release is concerned. So definitely not release critical.
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 Richard Biener changed: What|Removed |Added Priority|P3 |P1 Keywords|ice-on-invalid-code |ice-on-valid-code
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 --- Comment #2 from Marek Polacek --- We crash on the assert in get_defaulted_eh_spec: 2417 if (sfk == sfk_comparison) 2418 { 2419 /* We're in synthesize_method. Start with NULL_TREE, build_comparison_op 2420 will adjust as needed. */ 2421 gcc_assert (decl == current_function_decl); 2422 return NULL_TREE; 2423 } https://eel.is/c++draft/class.compare#default-5 seems to be relevant: If the three-way comparison operator function has no noexcept-specifier, the implicitly-declared == operator function has an implicit exception specification ([except.spec]) that may differ from the implicit exception specification of the three-way comparison operator function. [except.spec]/11 The exception specification for a comparison operator function ([over.binary]) without a noexcept-specifier that is defaulted on its first declaration is potentially-throwing if and only if any expression in the implicit definition is potentially-throwing. The implicit operator== has noexcept_deferred_spec, and unfortunately synthesized_method_walk doesn't seem to work on sfk_comparison.
[Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 Marek Polacek changed: What|Removed |Added Target Milestone|--- |10.0 Status|UNCONFIRMED |NEW CC||mpolacek at gcc dot gnu.org Last reconfirmed||2020-04-13 Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. Started with r10-6586-gd6ef77e023cfe0bb3b12b88ae46b77da356d7f85, before that we compiled it fine, as does clang.