gcc version 4.0.0 20050320 (Red Hat 4.0.0-0.35) The code produced by this version of gcc generates unaligned access exception. gcc 3.4.3 and 3.4.2 produces correct code
-- Summary: gcc with -O2 produces code that generates "unaligned access exception" Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tsv at solvo dot ru CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: alpha-redhat-linux GCC host triplet: alpha-redhat-linux GCC target triplet: alpha-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20625