https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104743

--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot 
Uni-Bielefeld.DE> ---
> --- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
> Does anything change if you compile the test with
> `-ftrivial-auto-var-init=zero` ?

No, the test fails just the same.

gdb shows

Thread 2 received signal SIGBUS, Bus error.
[Switching to Thread 1 (LWP 1)]
_d_newitemU (_ti=0xffffffff7f1f3000) at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/lifetime.d:1110
1110            *cast(TypeInfo*)(p + itemSize) = null; // the GC might not have
cleared this area
(gdb) bt
#0  _d_newitemU (_ti=0xffffffff7f1f3000) at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/lifetime.d:1110
#1  0x000000010007bd64 in rt.aaA.allocEntry(scope const(rt.aaA.Impl*), scope
const(void*)) (aa=0xffffffff7f1f2000, pkey=0xffffffff7f1f0000) at
/vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/aaA.d:214
#2  0x000000010007cd14 in _d_assocarrayliteralTX (ti=0x100071db8 <initializer
for TypeInfo_HS7pr9615217__unittest_L20_C7FNfZ15ThrowingElementi>, keys=...,
vals=...) at /vol/gcc/src/hg/master/local/libphobos/libdruntime/rt/aaA.d:767
#3  0x000000010007b57c in
object.aaLiteral!(pr96152.__unittest_L20_C7().ThrowingElement,
int).aaLiteral(pr96152.__unittest_L20_C7().ThrowingElement[], int[]) (keys=...,
values=...) at /vol/gcc/src/hg/master/local/libphobos/libdruntime/object.d:2868
...
1: x/i $pc
=> 0x100087080 <_d_newitemU+100>:       clrx  [ %o0 + %i2 ]
(gdb) p/x $o0 + $i2
$3 = 0xffffffff7f1f0054

i.e. the address isn't properly 8-byte aligned as required on a
strict-alignment target like SPARC.

Reply via email to