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

--- Comment #2 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Mikael Pettersson from comment #1)
> I can't reproduce on x86_64-linux with ether gcc-6 r230377, gcc-5 r230369,
> or gcc-4.9 r230368.

Mikael, not sure why you can't reproduce the miscompilation. I can still
reproduce it with r230832 as shown below: 

$ 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/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 6.0.0 20151114 (experimental) [trunk revision 230382] (GCC) 
$ 
$ gcc-trunk -O2 pr68328.c
$ ./a.out
0
$ gcc-trunk -Os pr68328.c
$ ./a.out
$

Reply via email to