This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/81573] New: wrong code at -O3 on x86_64-linux-gnu


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

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

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 8.0.0 20170727 (experimental) [trunk revision 250601] (GCC) 
$ 
$ gcc-trunk -O2 small.c; ./a.out
$ 
$ gcc-trunk -O3 small.c
$ timeout -s 9 5 ./a.out
Killed
$ 


------------------------------


int a = 1, *c = &a, d;
char b;

int main ()
{
  for (; b > -27; b--)
    {
      *c ^= b;
      *c ^= 1;
    }
  while (a > 1)
    ;
  return 0; 
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]