public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97888] New: wrong code at -Os and above on x86_64-pc-linux-gnu
@ 2020-11-18  9:49 zhendong.su at inf dot ethz.ch
  2020-11-18  9:54 ` [Bug tree-optimization/97888] [11 Regression] " jakub at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2020-11-18  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97888
           Summary: wrong code at -Os and above on x86_64-pc-linux-gnu
           Product: gcc
           Version: 11.0
            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: ---

[525] % 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/11.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 11.0.0 20201118 (experimental) [master revision
b03be74bad0:b7ec4b4b7a1:4b81528241ca682025d92558ff6aeec91dafdca8] (GCC) 
[526] % 
[526] % gcctk -O1 small.c; ./a.out
[527] % 
[527] % gcctk -Os small.c
[528] % ./a.out
Illegal instruction
[529] % 
[529] % cat small.c
int a = 1, b, c = 4, d, e;

int main() {
  int f = 2273363750;
  for (; b < 10; b++) {
    int g = f % (~0 && a) && g, h = 0, i = 0;
    if (c)
      h = f;
    if (h > -2021603546)
      e = d / i;
    f = h;
  }
  return 0;
}

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

end of thread, other threads:[~2020-11-18 21:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  9:49 [Bug tree-optimization/97888] New: wrong code at -Os and above on x86_64-pc-linux-gnu zhendong.su at inf dot ethz.ch
2020-11-18  9:54 ` [Bug tree-optimization/97888] [11 Regression] " jakub at gcc dot gnu.org
2020-11-18 10:00 ` jakub at gcc dot gnu.org
2020-11-18 10:20 ` jakub at gcc dot gnu.org
2020-11-18 10:33 ` jakub at gcc dot gnu.org
2020-11-18 13:35 ` amacleod at redhat dot com
2020-11-18 21:17 ` cvs-commit at gcc dot gnu.org
2020-11-18 21:57 ` jakub 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).