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

--- Comment #16 from Frank Scheiner <frank.scheiner at web dot de> ---
Now also verified on real ia64 hardware with a GCC 16.2.0 carrying the
suggested patch.

Musl's powl:
```
root@rx2800-i2:~/powl/gcc-16.2.0-fixed# ls -l
total 36
-rw-r--r-- 1 root root   300 Nov 25 20:54 m.c
-rw-r--r-- 1 root root  1392 Nov 25 20:54 pl.o
-rw-r--r-- 1 root root 25941 Nov 25 20:54 powl.i
root@rx2800-i2:~/powl/gcc-16.2.0-fixed# gcc -x cpp-output -O2 -std=c99
-ffreestanding \
>     -fexcess-precision=standard -frounding-math -fno-strict-aliasing \
>     -fdump-rtl-all -c powl.i -o p.o
root@rx2800-i2:~/powl/gcc-16.2.0-fixed# /opt/musl-ia64/bin/musl-gcc -o t p.o
pl.o m.c && ./t
powl(-1,2) = 0x1p+0   (expected 0x1p+0)
powl(-0,2) = 0x0p+0   (expected 0x0p+0)
```

****

Also confirmed with a full rebuild of musl and libc-test run against it:
```
root@rx2800-i2:/srv/slackware/tmp/libc-test# ( date; time make -j 9 2>&1; echo
$?; date ) 2>&1 | tee ~/libc-test-make.log
[...]
grep FAIL src/REPORT || echo PASS
FAIL src/functional/wordexp-static.exe [status 1]
FAIL src/functional/wordexp.exe [timed out]
FAIL src/math/exp10l.exe [status 1]
FAIL src/math/fmal.exe [status 1]
FAIL src/math/pow10l.exe [status 1]
FAIL src/math/powf.exe [status 1]
FAIL src/regression/pthread_atfork-errno-clobber-static.exe [status 1]
FAIL src/regression/pthread_atfork-errno-clobber.exe [status 1]
FAIL src/regression/statvfs-static.exe [status 1]
FAIL src/regression/statvfs.exe [status 1]
[...]
```

All tests related to pr128966 - that is
`src/math/{lgammal.exe,lgammal_r.exe,logl.exe,powl.exe}` - succeed now despite
musl libc compiled with `-O2` (and `-O3` for some parts).

****

New GCC testcase:
```
root@rx2800-i2:~/pr128966# gcc -O2 -ffixed-f2 -ffixed-f3 -ffixed-f4 -ffixed-f5
-ffixed-f16 -ffixed-f17 -ffixed-f18 -ffixed-f19 -ffixed-f20 -ffixed-f21
-ffixed-f22 -ffixed-f23 -ffixed-f24 -ffixed-f25 -ffixed-f26 -ffixed-f27
-ffixed-f28 -ffixed-f29 -ffixed-f30 -ffixed-f31 pr128966.c -o pr128966

root@rx2800-i2:~/pr128966# ./pr128966; echo $?
0
```

Reply via email to