------- Comment #32 from dave at hiauly1 dot hia dot nrc dot ca 2007-12-11 16:52 ------- Subject: Re: [4.3 Regression] 25_algorithms/search_n/iterator.cc: miscompiled on hppa2.0w-hp-hpux11.11
> At -O2 this has: > comib,>= 0,%r24,L$0025 > stw %r4,-72(%r30) > comib,= 1,%r24,L$0026 > ldil LR'L$C0002,%r28 > stw %r7,-52(%r30) > ldw 4(%r26),%r20 > ldo -112(%r30),%r25 > ldo -120(%r30),%r26 > stw %r20,-116(%r30) > ldw 4(%r6),%r19 > ldw 0(%r3),%r20 > stw %r19,-108(%r30) > stw %r20,-120(%r30) > ldw 0(%r6),%r19 > .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR > bl _Z4foo1I1DIiEPFbiiEET_S4_S4_iRKiT0_,%r2 > stw %r19,-112(%r30) > where the undesirable ldil LR'L$C0002,%r28 is in the delay slot of the > conditional branch. %r28 should contain the original %r28 value passed to the > function. %r28 is used as a function argument only struct values. It looks to me like the instruction to load the value from L$C0002 has been dropped. This would be an insn like ldw RR'L$C0002(%r28),%r?? or possibly ldo RR'L$C0002(%r28),%r?? if we want the address of L$C0002. If _Z4foo1I1DIiEPFbiiEET_S4_S4_iRKiT0_ expects a struct value, it might be the call usage information is incorrect. Of course, _Z4foo1I1DIiEPFbiiEET_S4_S4_iRKiT0_ might not have a struct value argument. Dave -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32636