public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/100492] New: wrong code at -O3 (generated code hangs)
@ 2021-05-09 13:09 zhendong.su at inf dot ethz.ch
  2021-05-10  8:11 ` [Bug tree-optimization/100492] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-05-09 13:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100492
           Summary: wrong code at -O3 (generated code hangs)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

It seems to be a recent regression.

[619] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--prefix=/local/suz-local/software/local/gcc-trunk --enable-languages=c,c++
--disable-werror --enable-multilib --with-system-zlib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210509 (experimental) [master revision
56103737f17:37fd4fac862:5e0236d3b0e0d7ad98bcee36128433fa755b5558] (GCC) 
[620] % 
[620] % gcctk -O2 small.c; ./a.out
0
[621] % gcc110 -O3 small.c; ./a.out
0
[622] % 
[622] % gcctk -O3 small.c
[623] % timeout -s 9 10 ./a.out
Killed
[624] % 
[624] % cat small.c
int printf (const char *, ...);
char a, c;
int b, d, *e = &d, g;
static char f;
int main() {
  int h = 0;
  for (; a < 1; a++) {
    int *i[5], **j = &i[4], ***k[3][2] = {{&j}}, ****l = &k[2][1], *****m = &l;
    char *n = &c;
    f = *e = g = 0;
    for (; g < 2; g++) {
      for (b = 0; b < 3; b++)
        h = (h && (*n = 0)) == 0;
      if (g)
        break;
    }
  }
  printf("%d\n", f);
  return 0;
}

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

end of thread, other threads:[~2021-06-16 14:24 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 13:09 [Bug tree-optimization/100492] New: wrong code at -O3 (generated code hangs) zhendong.su at inf dot ethz.ch
2021-05-10  8:11 ` [Bug tree-optimization/100492] " rguenth at gcc dot gnu.org
2021-05-10  8:14 ` rguenth at gcc dot gnu.org
2021-05-10  8:34 ` [Bug tree-optimization/100492] [12 Regression] " jakub at gcc dot gnu.org
2021-05-10  8:44 ` rguenth at gcc dot gnu.org
2021-05-10  9:19 ` rguenth at gcc dot gnu.org
2021-05-10  9:40 ` rguenth at gcc dot gnu.org
2021-05-10  9:42 ` [Bug tree-optimization/100492] [10/11/12 " rguenth at gcc dot gnu.org
2021-05-10 11:06 ` cvs-commit at gcc dot gnu.org
2021-05-25  8:07 ` [Bug tree-optimization/100492] [10/11 " cvs-commit at gcc dot gnu.org
2021-06-16 14:24 ` [Bug tree-optimization/100492] [10 " cvs-commit at gcc dot gnu.org
2021-06-16 14:24 ` rguenth 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).