public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/109491] [13 Regression] Segfault in tree-ssa-sccvn.cc:expressions_equal_p() Date: Thu, 13 Apr 2023 12:07:45 +0000 [thread overview] Message-ID: <bug-109491-4-kXEhM3WlBg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-109491-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109491 --- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- So we have a NULL op, in this case (gdb) p *vro1 $4 = {opcode = TARGET_MEM_REF, clique = 0, base = 0, reverse = 0, align = 0, off = {coeffs = {-1}}, type = <real_type 0x7ffff7309930 float>, op0 = <tree 0x0>, op1 = <tree 0x0>, op2 = <integer_cst 0x7ffff12cd138>} (gdb) p *vro2 $5 = {opcode = TARGET_MEM_REF, clique = 0, base = 0, reverse = 0, align = 0, off = {coeffs = {-1}}, type = <real_type 0x7ffff7309930 float>, op0 = <ssa_name 0x7ffff656f120 8261>, op1 = <tree 0x0>, op2 = <integer_cst 0x7ffff6119528>} I think we're lucky to not hit this more often (good hash!) and unlucky here (bad hash!). We used to have /* If only one of them is null, they cannot be equal. */ if (!e1 || !e2) return false; but r11-4982-g4d6b8d4213376e removed that. r11-5047-gaaccdb9cec423e fixed one case where that was previously needed. Now, for TARGET_MEM_REF a NULL operand is different from an operand with no effect (a zero) since the addressing mode is different. So canonicalization in copy_reference_ops_from_ref is unwanted (we'd use that representation for PRE insertion for example). The safest option is to restore the above check.
next prev parent reply other threads:[~2023-04-13 12:07 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-04-12 20:25 [Bug tree-optimization/109491] New: " pthaugen at gcc dot gnu.org 2023-04-12 20:26 ` [Bug tree-optimization/109491] [13 Regression] " pinskia at gcc dot gnu.org 2023-04-12 20:46 ` pthaugen at gcc dot gnu.org 2023-04-12 20:52 ` pinskia at gcc dot gnu.org 2023-04-12 20:54 ` pinskia at gcc dot gnu.org 2023-04-12 21:08 ` bergner at gcc dot gnu.org 2023-04-12 21:16 ` pthaugen at gcc dot gnu.org 2023-04-13 11:34 ` rguenth at gcc dot gnu.org 2023-04-13 11:35 ` rguenth at gcc dot gnu.org 2023-04-13 12:07 ` rguenth at gcc dot gnu.org [this message] 2023-04-13 12:17 ` rguenth at gcc dot gnu.org 2023-04-13 13:00 ` cvs-commit at gcc dot gnu.org 2023-04-13 13:01 ` [Bug tree-optimization/109491] [11/12 " rguenth at gcc dot gnu.org 2023-04-13 16:22 ` chip.kerchner at ibm dot com 2023-04-14 7:17 ` rguenth at gcc dot gnu.org 2023-04-14 12:24 ` chip.kerchner at ibm dot com 2023-04-14 12:45 ` rguenther at suse dot de 2023-04-14 13:15 ` rguenth at gcc dot gnu.org 2023-04-14 13:32 ` hubicka at gcc dot gnu.org 2023-04-17 9:14 ` cvs-commit at gcc dot gnu.org 2023-04-17 10:44 ` [Bug tree-optimization/109491] [11 " cvs-commit at gcc dot gnu.org 2023-04-17 10:46 ` rguenth 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-109491-4-kXEhM3WlBg@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).