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

            Bug ID: 96180
           Summary: gcc.dg/torture/pr96133.c FAILs
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: ebotcazou at gcc dot gnu.org, rguenth at gcc dot gnu.org
  Target Milestone: ---
            Target: sparc-sun-solaris2.11

The new gcc.dg/torture/pr96133.c test FAILs on Solaris/SPARC (both 32 and
64-bit)
at -O0 only:

+FAIL: gcc.dg/torture/pr96133.c   -O0  execution test

The failure mode is a bit weird in so far as the test reliably fails with make
check/runtest, but works when run manually.  With runtest -v, gcc.log shows

spawning command ./pr96133.exe
spawn [open ...]
exp10 file9
close result is child killed: bus error
FAIL: gcc.dg/torture/pr96133.c   -O0  execution test

and running the whole runtest under truss agrees:

5090:       Incurred fault #5, FLTACCESS  %pc = 0x00010CB0
5090:         siginfo: SIGBUS BUS_ADRALN addr=0x00010A34
5090:       Received signal #10, SIGBUS [default]
5090:         siginfo: SIGBUS BUS_ADRALN addr=0x00010A34

If I let a core dump be created, I see

   0x10c9c:     save  %sp, -112, %sp
   0x10ca0:     sethi  %hi(0x10800), %g1
   0x10ca4:     or  %g1, 0x234, %g1     ! 0x10a34 <_start+84>
   0x10ca8:     st  %g1, [ %fp + -4 ]
   0x10cac:     ld  [ %fp + -4 ], %g1
   0x10cb0:     ldtw  [ %g1 ], %g2

(which is the beginning of main), and %g1 at that point is only 4-byte aligned
while ldtw requires double-word aligment.

Reply via email to