gcc-bugs@gcc.gnu.org
[Top] [All Lists]

[Bug target/30271] New: -mstrict-align can cause bad code generation fo

Subject: [Bug target/30271] New: -mstrict-align can cause bad code generation for struct agrument passing
From: "pinskia at gcc dot gnu dot org"
Date: 21 Dec 2006 02:49:05 -0000
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

<Prev in Thread] Current Thread [Next in Thread>