https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124158
Bug ID: 124158
Summary: gdc.test/runnable/dbitfieldsdm.d FAILs
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: d
Assignee: ibuclaw at gdcproject dot org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
Target: sparc-sun-solaris2.11
The new gdc.test/runnable/dbitfieldsdm.d test FAILs on SPARC (both 32 and
64-bit):
FAIL: gdc.test/runnable/dbitfieldsdm.d execution test
DM | MS | P32 | P64
T0 = 1 1 || 1 1 | 1 1 | 1 1 | 1 1
[...]
A11 = 12 4 || 16 4 | 16 4 | 12 4 | 12 4
S9 = x800180
[New Thread 1 (LWP 1)]
Thread 2 received signal SIGBUS, Bus error.
[Switching to Thread 1 (LWP 1)]
D main () at runnable/dbitfieldsdm.d:167
167 *cast(long *)&s = 0;
1: x/i $pc
=> 0x93660 <_Dmain+1124>: clrx [ %g1 ]
(gdb) p/x $g1
$1 = 0xffbfec0c
(gdb) bt
#0 D main () at runnable/dbitfieldsdm.d:167
{
S14 s = { 1, 2, 3 };
ulong v;
*cast(long *)&s = 0;
The test is doing an unaligned access which breaks on strict-alignment targets.