This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the EGCS project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs 112 & alpha & bad -O1 optimization


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]