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

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

            Bug ID: 97567
           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: su at cs dot ucdavis.edu
  Target Milestone: ---

[550] % 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 20201025 (experimental) [master revision
1aeb7d7d67d:7a48d67add1:d7ddd287ca76e87f431f43687de6d8cc48e52543] (GCC)
[551] %
[551] % gcctk -O1 small.c; ./a.out
[552] %
[552] % gcctk -Os small.c
[553] % ./a.out
Illegal instruction
[554] %
[554] % cat small.c
int a, b, c, d;
void k() {
  unsigned f = 1;
  long g = 4073709551615;
  for (; a; a++)
    for (;;) {
      d = 0;
    L1:
      break;
    }
  if (f)
    for (; a; a++)
      ;
  g || f;
  int i = 0 - f || g;
  long j = g - f;
  if (j || f) {
    if (g < 4073709551615)
      for (;;)
        ;
    int e = ~f, h = b / ~e;
    if (c)
      goto L2;
    g = f = h;
  }
  g || d;
L2:
  if (c)
    goto L1;
}
int main() { k(); return 0; }

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

end of thread, other threads:[~2020-11-10  0:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-25  8:12 [Bug tree-optimization/97567] New: wrong code at -Os and above on x86_64-pc-linux-gnu su at cs dot ucdavis.edu
2020-10-25 10:49 ` [Bug tree-optimization/97567] [11 Regression] " jakub at gcc dot gnu.org
2020-10-26 19:07 ` amacleod at redhat dot com
2020-10-26 21:49 ` cvs-commit at gcc dot gnu.org
2020-10-27 11:27 ` hjl.tools at gmail dot com
2020-10-27 14:25 ` amacleod at redhat dot com
2020-11-04 18:35 ` amacleod at redhat dot com
2020-11-10  0:59 ` amacleod at redhat dot com
2020-11-10  0:59 ` cvs-commit 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).