[Bug c/18287] Unaligned access to fields inside packed records
ebotcazou at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Nov 3 18:17:00 GMT 2004
------- Additional Comments From ebotcazou at gcc dot gnu dot org 2004-11-03 18:17 -------
> t->Hour = 44; /* unaligned word access */
> is unaligned word access if t is not word aligned in the first place, correct
> which is where the problem comes in right?
I confirm that the bus error (not bug error!) happens with 4.0.0 20041103. But,
you're right, probably another problem there.
The compiler should not pass the adress of &dt->Time to Assign_Hour_Of if it
can't prove that the field is at least as aligned as its type.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18287
More information about the Gcc-bugs
mailing list