Testcase: struct a { short t, t1;}; int f(struct a b) { return b.t; } Without -mstrict-align, we get: .L.f: srawi 3,3,16 extsw 3,3 blr
But with we get: .L.f: stw 3,48(1) nop nop nop lha 3,48(1) extsw 3,3 blr -- Summary: -mstrict-align can cause bad code generation for struct agrument passing Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org GCC target triplet: powerpc64-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30271