This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/56341] GCC produces unaligned data access
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 15 Feb 2013 13:12:56 +0000
- Subject: [Bug c/56341] GCC produces unaligned data access
- Auto-submitted: auto-generated
- References: <bug-56341-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56341
--- Comment #1 from Bernd Edlinger <bernd.edlinger at hotmail dot de> 2013-02-15 13:12:56 UTC ---
Created attachment 29465
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29465
proposed patch
attached is a patch for gcc-4.6.3 that should resolve this issue.
volatile packed struct members are accessed in words if structure
is aligned by 2 and in bytes if structure is aligned by 1.