From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 789883858CDB; Thu, 5 Oct 2023 17:49:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 789883858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1696528183; bh=SFFiC6caKy+XY64aW0E3grN9w/fJD7MCPYl+MoaU+pA=; h=From:To:Subject:Date:From; b=mpha8ItFvMhPsWL98JIy2JZpeRlu/WUndKOAnLxPgBNSqHkwkCTTjifJ7hd0HvHHb ByaWghVJ3In/mpJM7o+v2Bjfd2j892QIUMKbnC9N3RMemVGwsL6n3mCSti1ZbxI9ce MfJDXVF4tUiJiUtBDzj1uxYrL2pGints/WMgW9/Y= From: "danglin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: regression X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: danglin at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111709 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=3D56056&action=3Dedit 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=3Dmath/test-double-fma make -r PARALLELMFLAGS=3D"" -C ../glibc objdir=3D`pwd` test make[1]: Entering directory '/home/dave/gnu/glibc/glibc' make subdir=3Dmath -C math/ ..=3D../ /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 -nostartf= iles -Wl,-z,relro /home/dave/gnu/glibc/objdir/csu/crt1.o /home/dave/gnu/glibc/objdir/csu/crti.o `gcc --print-file-name=3Dcrtbegin.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=3D/lib/ld.s= o.1 -Wl,-rpath-link=3D/home/dave/gnu/glibc/objdir:/home/dave/gnu/glibc/objdir/m= ath:/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/g= libc/objdir/rt:/home/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objd= ir/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-nee= ded -lgcc_s -Wl,--no-as-needed `gcc --print-file-name=3Dcrtend.o` /home/dave/gnu/glibc/objdir/csu/crtn.o env GCONV_PATH=3D/home/dave/gnu/glibc/objdir/iconvdata LOCPATH=3D/home/dave/gnu/glibc/objdir/localedata LC_ALL=3DC=20=20 /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/ob= jdir/nss:/home/dave/gnu/glibc/objdir/nis:/home/dave/gnu/glibc/objdir/rt:/ho= me/dave/gnu/glibc/objdir/resolv:/home/dave/gnu/glibc/objdir/mathvec:/home/d= ave/gnu/glibc/objdir/support:/home/dave/gnu/glibc/objdir/crypt:/home/dave/g= nu/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): Excepti= on "Underflow" set Failure: fma_upward (0x7.ffffffffffffp-1024, 0x8.0000000000008p-4, 0x4p-107= 6): 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=3Dgnu11 -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=20 -I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/hppa/nptl=20 -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux=20 -I../sysdeps/nptl -I../sysdeps/pthread -I../sysdeps/gnu=20 -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix=20 -I../sysdeps/posix -I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32=20 -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../l= ibio -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=3Dlibm -include ../include/libc-symbols.h -DPIC -DSHARED -DTOP_NAMESPACE=3Dglibc -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=