public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug regression/111709] New: [13 Regression] Miscompilation of sysdeps/ieee754/dbl-64/s_fma.c
Date: Thu, 05 Oct 2023 17:49:41 +0000	[thread overview]
Message-ID: <bug-111709-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2023-10-05 17:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-05 17:49 danglin at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111709-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).