This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/81573] New: wrong code at -O3 on x86_64-linux-gnu
- From: "su at cs dot ucdavis.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jul 2017 06:42:11 +0000
- Subject: [Bug tree-optimization/81573] New: wrong code at -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
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;
}