This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37867] inconsistent results on -O2 when reading bits from packed struct
- From: "edwintorok at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2008 18:07:59 -0000
- Subject: [Bug tree-optimization/37867] inconsistent results on -O2 when reading bits from packed struct
- References: <bug-37867-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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