public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94583] [10 Regression] ICE in get_defaulted_eh_spec, at cp/method.c:2421 Date: Tue, 14 Apr 2020 04:23:23 +0000 [thread overview] Message-ID: <bug-94583-4-YfmowbObvQ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-94583-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94583 --- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- 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.
next prev parent reply other threads:[~2020-04-14 4:23 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-13 19:35 [Bug c++/94583] New: " asolokha at gmx dot com 2020-04-13 23:27 ` [Bug c++/94583] " mpolacek at gcc dot gnu.org 2020-04-14 4:23 ` mpolacek at gcc dot gnu.org [this message] 2020-04-14 7:18 ` rguenth at gcc dot gnu.org 2020-04-20 13:55 ` rguenth at gcc dot gnu.org 2020-04-23 20:14 ` jason at gcc dot gnu.org 2020-04-25 4:17 ` cvs-commit at gcc dot gnu.org 2020-04-25 4:29 ` jason at gcc dot gnu.org 2020-04-28 18:38 ` cvs-commit at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-94583-4-YfmowbObvQ@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).