This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20608] Bus Error - union of structures
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Mar 2005 19:41:31 -0000
- Subject: [Bug target/20608] Bus Error - union of structures
- References: <20050323201701.20608.kminola@eng.umd.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2005-03-29 19:41 -------
The code is invalid: you're dereferencing a t_m pointer through a cast to
pointer to t_u. Now the structures don't have the same alignment (t_m is 32-bit
aligned while t_u is 64-bit aligned). I guess this accidentally worked in 3.4.x
because u was overaligned on the stack.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20608