union unaligned { void *ptr; } __attribute__((__packed__)); void *foo (void *p) { return (((union unaligned *) p)->ptr); }
is compiled to an aligned word access on sh64-*. It was compiled to an unaligned access before the patch r114364 | echristo | 2006-06-05 04:50:48 +0900 (Mon, 05 Jun 2006) | 17 lines -- Summary: packed union doesn't make the unaligned magic on sh64-* Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kkojima at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: sh64-*-* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27942