This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/39954] [4.5 Regression] Revision 146817 caused unaligned access in gcc.dg/torture/pr26565.c
- From: "mmitchel at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2009 15:48:26 -0000
- Subject: [Bug middle-end/39954] [4.5 Regression] Revision 146817 caused unaligned access in gcc.dg/torture/pr26565.c
- References: <bug-39954-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from mmitchel at gcc dot gnu dot org 2009-05-05 15:48 -------
Yes, we've been discussing the interaction between attributes and the type
system for at least a decade. :-) In type-theoretic terms, the address of a
packed int has type pointer-to-packed-int, not pointer-to-int. And the latter
can be safely converted to the former, but the former cannot be safely
converted to the latter.
Michael, unfortunately, if it was your change that introduced this regression,
you are responsible for solving the problem. The Right Answer, as you suggest,
is to include the packed attribute in the type system, but I suspect that will
be a major effort. Unfortunately, I don't know what else to suggest...
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39954