[Bug tree-optimization/37867] inconsistent results on -O2 when reading bits from packed struct

edwintorok at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Oct 18 18:09:00 GMT 2008



------- Comment #4 from edwintorok at gmail dot com  2008-10-18 18:07 -------
(In reply to comment #3)
> Does it work with -fno-strict-aliasing?
> 

It doesn't.

edwin@debian:~$ g++ -O2 -fno-strict-aliasing x.c
x.c: In function ‘int main()’:
x.c:15: warning: large integer implicitly truncated to unsigned type
x.c:17: warning: large integer implicitly truncated to unsigned type
edwin@debian:~$ ./a.out
bad bits: fffffffffffffff0


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37867



More information about the Gcc-bugs mailing list