From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15179 invoked by alias); 23 Aug 2004 11:17:05 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15172 invoked by uid 48); 23 Aug 2004 11:17:04 -0000 Date: Mon, 23 Aug 2004 11:17:00 -0000 From: "falk at debian dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20040823111659.17147.falk@debian.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug tree-optimization/17147] New: Alignment information lost with variable size structures X-Bugzilla-Reason: CC X-SW-Source: 2004-08/txt/msg02287.txt.bz2 List-Id: 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