http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45233
Iain Sandoe <iains at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.03.23 09:26:39 CC| |iains at gcc dot gnu.org, | |mrs at gcc dot gnu.org Ever Confirmed|0 |1 --- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> 2011-03-23 09:26:39 UTC --- confirmed for O1 : Apparently, we have concluded that the indirect references are not required when there is a 0 offset for the var. When the offset is non-zero (v.b, v.c, v.d), we correctly construct the indirect ref. for O0, all the references are correctly formed (and there is a corresponding L_w$non_lazy_ptr). --- .text .align 2 .globl _foo _foo: stw r31,-4(r1) ;, mflr r0 ;, bcl 20,31,L00000000001$pb ; L00000000001$pb: ; mflr r31 ;, mtlr r0 ;, addis r2,r31,ha16(_v-L00000000001$pb) ;,, la r10,lo16(_v-L00000000001$pb)(r2) ;,, addis r2,r31,ha16(_w-L00000000001$pb) ;,, la r11,lo16(_w-L00000000001$pb)(r2) ;,, addis r2,r31,ha16(L_v$non_lazy_ptr-L00000000001$pb) ;,, lwz r2,lo16(L_v$non_lazy_ptr-L00000000001$pb)(r2) ;,, addis r8,r31,ha16(L_v$non_lazy_ptr-L00000000001$pb) ;,, lwz r8,lo16(L_v$non_lazy_ptr-L00000000001$pb)(r8) ;,, addis r9,r31,ha16(L_v$non_lazy_ptr-L00000000001$pb) ;,, lwz r9,lo16(L_v$non_lazy_ptr-L00000000001$pb)(r9) ;,, ; 12 "/Volumes/ScratchCS/gcc-live-trunk/gcc/testsuite/gcc.c-torture/compile/pr44707.c" 1 /* 0(r10) 0(r11) 4(r2) 8(r8) 12(r9) */ ; v.a, w, v.b, v.c, v.d ; 0 "" 2 lwz r31,-4(r1) ;, blr ; .non_lazy_symbol_pointer L_v$non_lazy_ptr: .indirect_symbol _v .long 0 .subsections_via_symbols