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: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Oct 2008 14:05:19 -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 #2 from rguenth at gcc dot gnu dot org 2008-10-18 14:05 -------
You invoke undefined behavior by accessing parts of a and b via
*(1+(uint64_t *) &x). This access is not valid because of C aliasing rules.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37867