public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "aldyh at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/106157] [13 Regression] ICE verify_ssa failed since r13-1268-g8c99e307b20c502e
Date: Wed, 06 Jul 2022 12:15:42 +0000	[thread overview]
Message-ID: <bug-106157-4-DMkrIM16Vq@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106157-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106157

--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
For example, in create():

  <bb 4> [local count: 1073741824]:
  _15 = MEM[(struct VideoFrame &)&videoFrame].lineSize;
  _16 = (long unsigned int) _15;
  _17 = MEM[(struct vector *)&videoFrame + 8B].D.4741._M_impl._M_finish;
  __trans_tmp_4_19 = _17 - __pos_13;
  _20 = (long unsigned int) __trans_tmp_4_19;
  if (_16 > _20)
    goto <bb 5>; [100.00%]
  else
    goto <bb 10>; [0.00%]


In dom2, lineSize is read uninitialized.  As a bonus create() has no return. 
So BB10 has a __builtin_unreachable, which makes DOM2 set _16 to nonzero.  This
is set globally, which then causes one of the threaders to thread paths through
BB4, then DOM3 to simplify things further, with the ranger setting some ranges
to UNDEFINED...  This cannot end well ;-).

So yeah...we need valid IL.

That being said, the compiler should never ICE.  So if the original testcase
has undefined behavior and that's the reason for the ICE, we should fix that as
well.

  parent reply	other threads:[~2022-07-06 12:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-01  9:20 [Bug tree-optimization/106157] New: " marxin at gcc dot gnu.org
2022-07-01  9:20 ` [Bug tree-optimization/106157] [13 Regression] " marxin at gcc dot gnu.org
2022-07-05  9:15 ` aldyh at gcc dot gnu.org
2022-07-05 10:00 ` rguenth at gcc dot gnu.org
2022-07-06 11:41 ` aldyh at gcc dot gnu.org
2022-07-06 12:15 ` aldyh at gcc dot gnu.org [this message]
2022-10-19 10:35 ` rguenth at gcc dot gnu.org
2023-02-01 15:13 ` amacleod at redhat dot com
2023-02-01 15:15 ` marxin at gcc dot gnu.org
2023-02-02  8:10 ` 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-106157-4-DMkrIM16Vq@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: link
Be 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).