public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/96299] Defaulted operator <=> implicitly deleted when a member has operator < and operator == and return type is specified Date: Wed, 19 May 2021 20:17:20 +0000 [thread overview] Message-ID: <bug-96299-4-1Ys45eieQn@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96299-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96299 --- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Jason Merrill <jason@gcc.gnu.org>: https://gcc.gnu.org/g:3bdd3e45955ef94a1f2db51a2af1ded54d41f670 commit r11-8437-g3bdd3e45955ef94a1f2db51a2af1ded54d41f670 Author: Jason Merrill <jason@redhat.com> Date: Tue May 18 12:29:33 2021 -0400 c++: ICE with <=> fallback [PR100367] Here, when genericizing lexicographical_compare_three_way, we haven't yet walked the operands, so (a == a) still sees ADDR_EXPR <a>, but this is after we've changed the type of a to REFERENCE_TYPE. When we try to fold (a == a) by constexpr evaluation, the constexpr code doesn't understand trying to take the address of a reference, and we end up crashing. Fixed by avoiding constexpr evaluation in genericize_spaceship, by using fold_build2 instead of build_new_op on scalar operands. Class operands should have been expanded during parsing. PR c++/100367 PR c++/96299 gcc/cp/ChangeLog: * method.c (genericize_spaceship): Use fold_build2 for scalar operands. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/spaceship-fallback1.C: New test.
prev parent reply other threads:[~2021-05-19 20:17 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-23 14:08 [Bug c++/96299] New: " gcc-bugzilla at mysko dot org 2020-10-07 17:26 ` [Bug c++/96299] " mpolacek at gcc dot gnu.org 2020-11-15 0:44 ` gcc-bugzilla at mysko dot org 2020-12-03 16:39 ` jakub at gcc dot gnu.org 2020-12-08 20:13 ` cvs-commit at gcc dot gnu.org 2020-12-08 20:13 ` jason at gcc dot gnu.org 2021-05-19 20:17 ` cvs-commit at gcc dot gnu.org 2021-05-19 20:17 ` cvs-commit at gcc dot gnu.org [this message]
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-96299-4-1Ys45eieQn@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).