This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the EGCS project.
egcs 112 & alpha & bad -O1 optimization
- To: gcc-bugs@gcc.gnu.org
- Subject: egcs 112 & alpha & bad -O1 optimization
- From: Uncle George <gatgul@voicenet.com>
- Date: Thu, 29 Jul 1999 13:12:12 -0400
- Organization: Big Endian
The following attached preprocessed 'f.c' from postgresql failes to
properly compile with -O1. In particular the char *v in the argument
list of comphash appears to get translated into a long *
the particular errant code segment from comphash() is :
while (l--)
i += *v++;
which appear to get xlated into assembler:
$L205:
ldl $1,0($0)
sll $1,56,$1
sra $1,56,$1
addq $2,$1,$2
addq $0,1,$0
subq $9,1,$9
cmpeq $9,$3,$1
beq $1,$L205
unfortunately this does not do very well for the *v, which gets an
alignment fault!
gat
f.c.gz
f.s.gz