public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/94567] New: wrong code at -O2 and -O3 on x86_64-linux-gnu
@ 2020-04-12  2:49 qrzhang at gatech dot edu
  2020-04-14  6:41 ` [Bug rtl-optimization/94567] [10 Regression] " marxin at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: qrzhang at gatech dot edu @ 2020-04-12  2:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94567
           Summary: wrong code at -O2 and -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: qrzhang at gatech dot edu
  Target Milestone: ---

It's a recent regression. Bisection points to g:529ea7d9596b26ba103578eeab


$ gcc-trunk -v
gcc version 10.0.1 20200411 (experimental) [master revision
bb87d5cc77d:75961caccb7:f883c46b4877f637e0fa5025b4d6b5c9040ec566] (GCC)


$ gcc-trunk abc.c ; ./a.out
4

$ gcc-trunk -O2 abc.c ; ./a.out
0


$ cat abc.c
volatile int a = 1, b;
short c, d = 4, e = 53736, f = 2, g;
int(h)(int i, int j) { return i && j ? 0 : i + j; }
int main() {
  for (; a; a = 0) {
    unsigned short k = e;
    g = k >> 3;
    if (h(g < (f || c), b))
      d = 0;
  }
  printf("%X\n", d);
}

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

end of thread, other threads:[~2020-04-17 15:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-12  2:49 [Bug tree-optimization/94567] New: wrong code at -O2 and -O3 on x86_64-linux-gnu qrzhang at gatech dot edu
2020-04-14  6:41 ` [Bug rtl-optimization/94567] [10 Regression] " marxin at gcc dot gnu.org
2020-04-14 11:28 ` law at redhat dot com
2020-04-14 11:45 ` [Bug target/94567] " rguenth at gcc dot gnu.org
2020-04-14 11:48 ` rguenth at gcc dot gnu.org
2020-04-14 11:59 ` law at redhat dot com
2020-04-14 12:45 ` rguenth at gcc dot gnu.org
2020-04-14 13:20 ` law at redhat dot com
2020-04-15  9:57 ` rguenth at gcc dot gnu.org
2020-04-15 16:57 ` jakub at gcc dot gnu.org
2020-04-15 17:10 ` jakub at gcc dot gnu.org
2020-04-15 17:14 ` law at redhat dot com
2020-04-15 17:48 ` jakub at gcc dot gnu.org
2020-04-15 23:12 ` law at redhat dot com
2020-04-16 12:30 ` jakub at gcc dot gnu.org
2020-04-16 22:45 ` law at redhat dot com
2020-04-17 14:58 ` cvs-commit at gcc dot gnu.org
2020-04-17 15:11 ` 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).