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

            Bug ID: 113059
           Summary: [14 regression] fftw fails tests for -O3 -m32
                    -march=znver2 since r14-6210-ge44ed92dbbe9d4
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

fftw started failing tests (very inconsistently - almost always fails, but
sometimes w/ segfault, sometimes with wrong results) since
r14-6210-ge44ed92dbbe9d4.

Might be a continuation of PR112572. We had pinskia's workaround patch applied
until r14-6210-ge44ed92dbbe9d4 landed so I may need to double check.

I can reproduce with the following:
```
./configure CFLAGS="-O3 -m32 -march=znver2 -ggdb3"
make -j$(nproc)
make -j$(nproc) check
```

Just `tests/bench --verbose=1 --verify //obrd896` seems to be a good crasher
for me.

```
Program received signal SIGSEGV, Segmentation fault.
r2cf_32 (R0=0xffff97c0, R1=0xffff98d0, Cr=0xffff97c0, Ci=<optimized out>,
rs=<optimized out>, csr=0x56690040, csi=0x0, v=<optimized out>, ivs=1, ovs=1)
at r2cf_32.c:490
490                         Ci[WS(csi, 8)] = T29 - T28;
(gdb) bt
#0  r2cf_32 (R0=0xffff97c0, R1=0xffff98d0, Cr=0xffff97c0, Ci=<optimized out>,
rs=<optimized out>, csr=0x56690040, csi=0x0, v=<optimized out>, ivs=1, ovs=1)
at r2cf_32.c:490
#1  0x56632963 in dobatch_r2hc (ego=0x566916b0, I=0x56680e80, O=0x56680e80,
buf=0xffff97c0, batchsz=1) at direct-r2c.c:91
#2  0x56632a5d in iterate (ego=0x566916b0, I=<optimized out>, O=<optimized
out>, dobatch=0x56632880 <dobatch_r2hc>) at direct-r2c.c:142
#3  0x565a09f5 in fftw_rdft_solve (ego_=0x566916b0, p_=0x566921d0) at
solve.c:29
#4  0x565603eb in measure (iter=1, p=<optimized out>, pln=<optimized out>) at
timer.c:136
#5  fftw_measure_execution_time (plnr=0x56684690, pln=0x566916b0, p=0x566921d0)
at timer.c:159
#6  0x5655d853 in evaluate_plan (ego=ego@entry=0x56684690,
pln=pln@entry=0x566916b0, p=p@entry=0x566921d0) at planner.c:460
#7  0x5655e773 in search0 (ego=ego@entry=0x56684690, p=p@entry=0x566921d0,
slvndx=slvndx@entry=0xffffbbac, flagsp=<optimized out>) at planner.c:529
#8  0x5655eb37 in search (flagsp=0xffffbbb0, slvndx=0xffffbbac, p=0x566921d0,
ego=0x56684690) at planner.c:600
#9  mkplan (ego=<optimized out>, p=<optimized out>) at planner.c:711
[...]
```

Reducing is challenging so far, as FFTW is massive. I'm not going to waste much
more time on that, but I'll do the usual bisecting object files and such now.

Reply via email to