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

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