public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17147] New: Alignment information lost with variable size structures
@ 2004-08-23 11:17 falk at debian dot org
  2004-11-04 15:34 ` [Bug tree-optimization/17147] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: falk at debian dot org @ 2004-08-23 11:17 UTC (permalink / raw)
  To: gcc-bugs

Given this code:

int f(int n, void *p) {
    struct {
        int a[n];
        int b[n];
    } *sp = p;    
    return sp->b[5];
}

3.4 and 3.5 20040815 (ugh. I should probably try a newer one) generate:

        s4addq $16,$17,$17
        ldl $0,20($17)

while lno generates:
        s4addq $16,$17,$17
        lda $2,20($17)
        ldq_u $3,20($17)
        ldq_u $1,3($2)
        extll $3,$2,$3
        extlh $1,$2,$1
        bis $3,$1,$0
        addl $31,$0,$0

that is, it does an unaligned load. This does not happen at -O0.

-- 
           Summary: Alignment information lost with variable size structures
           Product: gcc
           Version: lno
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: falk at debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: alphaev68-unknown-linux-gnu
  GCC host triplet: alphaev68-unknown-linux-gnu
GCC target triplet: alphaev68-unknown-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17147


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug tree-optimization/17147] Alignment information lost with variable size structures
  2004-08-23 11:17 [Bug tree-optimization/17147] New: Alignment information lost with variable size structures falk at debian dot org
@ 2004-11-04 15:34 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-04 15:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-04 15:34 -------
The LNO branch is dead and it works correctly on the mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
           Keywords|                            |missed-optimization
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17147


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-04 15:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23 11:17 [Bug tree-optimization/17147] New: Alignment information lost with variable size structures falk at debian dot org
2004-11-04 15:34 ` [Bug tree-optimization/17147] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).