public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/100934] New: wrong code at -O3 on x86_64-linux-gnu
@ 2021-06-06 20:49 zhendong.su at inf dot ethz.ch
  2021-06-06 21:07 ` [Bug tree-optimization/100934] [9/10/11/12 Regression] wrong code at -O3 during unrolling pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2021-06-06 20:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100934
           Summary: wrong code at -O3 on x86_64-linux-gnu
           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 affect all versions since GCC 8.4 (but not GCC 8.3). 

[583] % 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 20210606 (experimental) [master revision
28c62475050:a6bc26893ec:a589877a0036fc2f66b7a957859940c53efdc7c9] (GCC) 
[584] % 
[584] % gcctk -O2 small.c; ./a.out
[585] % 
[585] % gcctk -O3 small.c
[586] % ./a.out
Segmentation fault
[587] % 
[587] % cat small.c
int a, b, c, d, e;
int main() {
  int f = 0, g = 0;
  for (; f < 2; f++) {
    int h, i;
    for (h = 0; h < 2; h++) {
      b = e = g ? a % g : 0;
      c = d;
      for (i = 0; i < 1; i++)
        g = 0;
      for (; g < 2; g++)
        ;
    }
  }
  return 0;
}

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

end of thread, other threads:[~2021-11-09  7:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06 20:49 [Bug tree-optimization/100934] New: wrong code at -O3 on x86_64-linux-gnu zhendong.su at inf dot ethz.ch
2021-06-06 21:07 ` [Bug tree-optimization/100934] [9/10/11/12 Regression] wrong code at -O3 during unrolling pinskia at gcc dot gnu.org
2021-06-07  8:38 ` [Bug tree-optimization/100934] [9/10/11/12 Regression] wrong code at -O3 during unrolling since r9-6299 jakub at gcc dot gnu.org
2021-06-07  8:42 ` jakub at gcc dot gnu.org
2021-06-07 10:28 ` rguenth at gcc dot gnu.org
2021-06-07 13:13 ` rguenth at gcc dot gnu.org
2021-06-11  9:28 ` rguenth at gcc dot gnu.org
2021-06-14  2:48 ` law at gcc dot gnu.org
2021-06-14 12:56 ` rguenth at gcc dot gnu.org
2021-06-14 12:59 ` jakub at gcc dot gnu.org
2021-06-14 13:02 ` rguenther at suse dot de
2021-06-14 14:37 ` cvs-commit at gcc dot gnu.org
2021-06-14 14:39 ` [Bug tree-optimization/100934] [9/10/11 " rguenth at gcc dot gnu.org
2021-06-16 13:12 ` cvs-commit at gcc dot gnu.org
2021-06-16 14:24 ` [Bug tree-optimization/100934] [9/10 " cvs-commit at gcc dot gnu.org
2021-10-13 10:09 ` [Bug tree-optimization/100934] [9 " cvs-commit at gcc dot gnu.org
2021-10-13 10:10 ` rguenth at gcc dot gnu.org
2021-11-09  7:57 ` pinskia 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).