public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/111709] New: [13 Regression] Miscompilation of sysdeps/ieee754/dbl-64/s_fma.c
@ 2023-10-05 17:49 danglin at gcc dot gnu.org
  2023-10-05 17:50 ` [Bug regression/111709] " danglin at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: danglin at gcc dot gnu.org @ 2023-10-05 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111709
           Summary: [13 Regression] Miscompilation of
                    sysdeps/ieee754/dbl-64/s_fma.c
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: regression
          Assignee: unassigned at gcc dot gnu.org
          Reporter: danglin at gcc dot gnu.org
  Target Milestone: ---
              Host: hppa*-*-linux*
            Target: hppa*-*-linux*
             Build: hppa*-*-linux*

Created attachment 56056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56056&action=edit
Preproccessed source generated using gcc-12

This fail occurs with gcc version 13.1.0 (Debian 13.1.0-8) in the .

dave@mx3210:~/gnu/glibc/objdir$ make test t=math/test-double-fma
make -r PARALLELMFLAGS="" -C ../glibc objdir=`pwd` test
make[1]: Entering directory '/home/dave/gnu/glibc/glibc'
make subdir=math -C math/ ..=../
/home/dave/gnu/glibc/objdir/math/test-double-fma.out
make[2]: Entering directory '/home/dave/gnu/glibc/glibc/math'
gcc -o /home/dave/gnu/glibc/objdir/math/test-double-fma -nostdlib -nostartfiles
    -Wl,-z,relro  /home/dave/gnu/glibc/objdir/csu/crt1.o
/home/dave/gnu/glibc/objdir/csu/crti.o `gcc  --print-file-name=crtbegin.o`
/home/dave/gnu/glibc/objdir/math/test-double-fma.o
/home/dave/gnu/glibc/objdir/support/libsupport_nonshared.a
/home/dave/gnu/glibc/objdir/math/libm-test-support-double.o
/home/dave/gnu/glibc/objdir/math/libm.so.6  -Wl,-dynamic-linker=/lib/ld.so.1
-Wl,-rpath-link=/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/math:/home/dave/gnu/glibc/objdir/elf:/home/dave/gnu/glibc/objdir/dlfcn:/home/dave/gnu/glibc/objdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/home/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/mathvec:/home/dave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objdir/crypt:/home/dave/gnu/glibc/objdir/nptl
-lgcc -Wl,--as-needed -lgcc_s  -Wl,--no-as-needed
/home/dave/gnu/glibc/objdir/libc.so.6
/home/dave/gnu/glibc/objdir/libc_nonshared.a -Wl,--as-needed
/home/dave/gnu/glibc/objdir/elf/ld.so -Wl,--no-as-needed -lgcc -Wl,--as-needed
-lgcc_s  -Wl,--no-as-needed `gcc  --print-file-name=crtend.o`
/home/dave/gnu/glibc/objdir/csu/crtn.o
env GCONV_PATH=/home/dave/gnu/glibc/objdir/iconvdata
LOCPATH=/home/dave/gnu/glibc/objdir/localedata LC_ALL=C  
/home/dave/gnu/glibc/objdir/elf/ld.so.1 --library-path
/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/math:/home/dave/gnu/glibc/objdir/elf:/home/dave/gnu/glibc/objdir/dlfcn:/home/dave/gnu/glibc/objdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/home/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/mathvec:/home/dave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objdir/crypt:/home/dave/gnu/glibc/objdir/nptl
/home/dave/gnu/glibc/objdir/math/test-double-fma  >
/home/dave/gnu/glibc/objdir/math/test-double-fma.out; \
../scripts/evaluate-test.sh math/test-double-fma $? false false >
/home/dave/gnu/glibc/objdir/math/test-double-fma.test-result
make[2]: Leaving directory '/home/dave/gnu/glibc/glibc/math'
FAIL: math/test-double-fma
original exit status 1
testing double (without inline functions)
Failure: fma (-0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, -0x4p-1076):
Exception "Underflow" set
Failure: fma (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-1076):
Exception "Underflow" set
Failure: fma_downward (-0x4p-1076, 0x8.8p-4, -0x3.ffffffffffffcp-1024):
Exception "Underflow" set
Failure: fma_downward (-0x7.ffffffffffffp-1024, 0x8.0000000000008p-4,
-0x4p-1076): Exception "Underflow" set
Failure: Test: fma_upward (-0x3.ffffffffffffep-712, 0x3.ffffffffffffep-276,
0x3.fffffc0000ffep-984)
Result:
 is:          1.8348707892449242e-296   0x1.7ffffe00007ffp-983
 should be:   1.8348707892449245e-296   0x1.7ffffe0000800p-983
 difference:  2.7161546124355486e-312   0x0.0008000000000p-1022
 ulp       :  1.0000
 max.ulp   :  0.0000
Failure: fma_upward (0x4p-1076, 0x8.8p-4, 0x3.ffffffffffffcp-1024): Exception
"Underflow" set
Failure: fma_upward (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-1076):
Exception "Underflow" set

Test suite completed:
  2524 test cases plus 2520 tests for exception flags and
    2520 tests for errno executed.
  7 errors occurred.
make[1]: Leaving directory '/home/dave/gnu/glibc/glibc'

Test doesn't fail with gcc-12.

Similar fails:
FAIL: math/test-double-ldouble-fma
FAIL: math/test-float32x-float64-fma
FAIL: math/test-float32x-fma
FAIL: math/test-float64-fma
FAIL: math/test-ldouble-fma

If s_fma.c is compiled with gcc-12, these fma fails don't occur.

This is glibc BZ 30664.

This is compile command for s_fma.c:

gcc-13 ../sysdeps/ieee754/dbl-64/s_fma.c -c -std=gnu11 -fgnu89-inline  -g -O2
-Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wp,-U_FORTIFY_SOURCE -Wstrict-prototypes
-Wold-style-definition -fno-math-errno    -fPIC   -fno-builtin-fmal
-fno-builtin-fmaf32x -fno-builtin-fmaf64      -DNO_LONG_DOUBLE -I../include
-I/home/dave/gnu/glibc/objdir/math  -I/home/dave/gnu/glibc/objdir 
-I../sysdeps/unix/sysv/linux/hppa  -I../sysdeps/hppa/nptl 
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux 
-I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu 
-I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix 
-I../sysdeps/posix  -I../sysdeps/hppa/hppa1.1  -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/hppa/fpu
 -I../sysdeps/hppa  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio
-I. -nostdinc -isystem /usr/lib/gcc/hppa-linux-gnu/13/include -isystem
/usr/include -D_LIBC_REENTRANT -include
/home/dave/gnu/glibc/objdir/libc-modules.h -DMODULE_NAME=libm -include
../include/libc-symbols.h  -DPIC -DSHARED     -DTOP_NAMESPACE=glibc -o
/home/dave/gnu/glibc/objdir/math/s_fma.os -MD -MP -MF
/home/dave/gnu/glibc/objdir/math/s_fma.os.dt -MT
/home/dave/gnu/glibc/objdir/math/s_fma.os

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-05-21  9:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-05 17:49 [Bug regression/111709] New: [13 Regression] Miscompilation of sysdeps/ieee754/dbl-64/s_fma.c danglin at gcc dot gnu.org
2023-10-05 17:50 ` [Bug regression/111709] " danglin at gcc dot gnu.org
2023-10-05 17:51 ` danglin at gcc dot gnu.org
2023-10-05 17:52 ` danglin at gcc dot gnu.org
2023-10-05 18:01 ` danglin at gcc dot gnu.org
2023-10-05 18:01 ` danglin at gcc dot gnu.org
2023-10-05 18:06 ` danglin at gcc dot gnu.org
2023-10-05 18:25 ` danglin at gcc dot gnu.org
2023-10-05 20:33 ` joseph at codesourcery dot com
2023-10-06  7:50 ` rguenth at gcc dot gnu.org
2023-10-07 22:33 ` dave.anglin at bell dot net
2023-10-11 15:36 ` [Bug regression/111709] [13/14 " danglin at gcc dot gnu.org
2023-10-15  1:15 ` danglin at gcc dot gnu.org
2024-05-02  3:04 ` [Bug regression/111709] [13/14/15 " matoro_gcc_bugzilla at matoro dot tk
2024-05-02 15:28 ` danglin at gcc dot gnu.org
2024-05-21  9:18 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).