public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312
@ 2023-10-03  7:11 shaohua.li at inf dot ethz.ch
  2023-10-04  9:48 ` [Bug tree-optimization/111671] [14 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: shaohua.li at inf dot ethz.ch @ 2023-10-03  7:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111671
           Summary: ICE in get_default_value, at tree-ssa-ccp.cc:312
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shaohua.li at inf dot ethz.ch
                CC: aldyh at redhat dot com
  Target Milestone: ---

gcc at -O2/3 crashes.

Bisected to r14-2965-gc83528d2367

Compiler explorer: https://godbolt.org/z/MEnY9sYh5

$ cat a.c
int a, b, c, d;
int e() {
  if (a)
    return 0;
  return -1;
}
static unsigned f(short);
void h() {
  int g = 59258;
  b = -50;
  g |= e() + b;
  f(g);
}
unsigned f(short i) {
  int *j[15], *k[15] = {};
  j[0] = 0;
  {
    long l[4];
    long m = *l, *n[] = {&m};
    for (; c; c++)
      d = i;
    int** o[] = {k, j};
  }
}
int main() {}
$
$ gcc -O2 a.c
during GIMPLE pass: ccp
a.c: In function ‘f.isra’:
a.c:14:10: internal compiler error: in get_default_value, at
tree-ssa-ccp.cc:312
   14 | unsigned f(short i) {
      |          ^
0x7ff11cd60082 __libc_start_main
        ../csu/libc-start.c:308
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
$

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312
  2023-10-03  7:11 [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312 shaohua.li at inf dot ethz.ch
@ 2023-10-04  9:48 ` rguenth at gcc dot gnu.org
  2023-10-17 13:03 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-04  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-10-04
   Target Milestone|---                         |14.0
           Keywords|                            |ice-on-valid-code
            Summary|ICE in get_default_value,   |[14 Regression] ICE in
                   |at tree-ssa-ccp.cc:312      |get_default_value, at
                   |                            |tree-ssa-ccp.cc:312
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  Might be an issue in IPA VRP / ranger not properly normalizing the
value part.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312
  2023-10-03  7:11 [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312 shaohua.li at inf dot ethz.ch
  2023-10-04  9:48 ` [Bug tree-optimization/111671] [14 Regression] " rguenth at gcc dot gnu.org
@ 2023-10-17 13:03 ` rguenth at gcc dot gnu.org
  2023-11-11 13:58 ` [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312 since r14-2965-gc83528d2367 shaohua.li at inf dot ethz.ch
  2024-03-07 21:44 ` law at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 13:03 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
           Keywords|                            |needs-bisection

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Seems to be fixed, possibly by the _BitInt<> changes.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312 since r14-2965-gc83528d2367
  2023-10-03  7:11 [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312 shaohua.li at inf dot ethz.ch
  2023-10-04  9:48 ` [Bug tree-optimization/111671] [14 Regression] " rguenth at gcc dot gnu.org
  2023-10-17 13:03 ` rguenth at gcc dot gnu.org
@ 2023-11-11 13:58 ` shaohua.li at inf dot ethz.ch
  2024-03-07 21:44 ` law at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: shaohua.li at inf dot ethz.ch @ 2023-11-11 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Shaohua Li <shaohua.li at inf dot ethz.ch> ---
Yes, I cannot reproduce it anymore. Any idea about which commit fixed it?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312 since r14-2965-gc83528d2367
  2023-10-03  7:11 [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312 shaohua.li at inf dot ethz.ch
                   ` (2 preceding siblings ...)
  2023-11-11 13:58 ` [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312 since r14-2965-gc83528d2367 shaohua.li at inf dot ethz.ch
@ 2024-03-07 21:44 ` law at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 21:44 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |FIXED
                 CC|                            |law at gcc dot gnu.org

--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
It was fixed by:

commit 171420fdc9208198f09ff258164fc4cc1fd4bf74 (refs/bisect/bad)
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Oct 6 08:54:42 2023 +0200

    ipa: Remove ipa_bits

    The following patch removes ipa_bits struct pointer/vector from ipa
    jump functions and ipa cp transformations.
[ ... ]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-07 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03  7:11 [Bug tree-optimization/111671] New: ICE in get_default_value, at tree-ssa-ccp.cc:312 shaohua.li at inf dot ethz.ch
2023-10-04  9:48 ` [Bug tree-optimization/111671] [14 Regression] " rguenth at gcc dot gnu.org
2023-10-17 13:03 ` rguenth at gcc dot gnu.org
2023-11-11 13:58 ` [Bug tree-optimization/111671] [14 Regression] ICE in get_default_value, at tree-ssa-ccp.cc:312 since r14-2965-gc83528d2367 shaohua.li at inf dot ethz.ch
2024-03-07 21:44 ` law at gcc dot gnu.org

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).