https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106579
Bug ID: 106579 Summary: ieee_signaling_nan problem in fortran on powerpc64 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: seurer at gcc dot gnu.org Target Milestone: --- There is an issue with ieee_signaling_nan as used in fortran on powerpc64 when --with-long-double-format=ieee is used. Extracted from gfortran.dg/ieee/signaling_3.f90: program test use, intrinsic :: iso_c_binding use, intrinsic :: ieee_arithmetic implicit none real(kind=c_long_double) :: z if (ieee_support_nan(z)) then z = ieee_value(z, ieee_signaling_nan) if (ieee_class(z) /= ieee_signaling_nan) stop 100 end if end program test seurer@fowler:~/gcc/git/build/gcc-12-test$ /home/seurer/gcc/git/build/gcc-12-test/gcc/testsuite/gfortran/../../gfortran -B/home/seurer/gcc/git/build/gcc-12-test/gcc/testsuite/gfortran/../../ -B/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libgfortran/ signaling_3a.f90 -fdiagnostics-plain-output -fdiagnostics-plain-output -O0 -pedantic-errors -fintrinsic-modules-path /home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libgfortran/ -fno-unsafe-math-optimizations -frounding-math -fsignaling-nans -B/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libatomic/.libs -B/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libquadmath/.libs -L/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libquadmath/.libs -L/home/seurer/gcc/git/build/gcc-12-test/powerpc64le-unknown-linux-gnu/./libquadmath/.libs -lm -o ./signaling_3a.exe seurer@fowler:~/gcc/git/build/gcc-12-test$ ./signaling_3a.exe STOP 100 This happens for both gcc 12 and 13 (trunk). It occurs on powerpc64 LE with the compiler being tested configured with --with-long-double-format=ieee on Fedora 36 which is the first powerpc64 distro built with --with-long-double-format=ieee. The distro compiler is gcc version 12.1.1 20220507 (Red Hat 12.1.1-1) (GCC). Note the specific test case, signaling_3.f90, was added here but another test case signaling_2.f90 fails the same way. commit e89d0befe3ec3238fca6de2cb078eb403b8c7e99 (HEAD) Author: Francois-Xavier Coudert <fxcoud...@gcc.gnu.org> Date: Mon Jan 17 12:46:48 2022 +0100 Fortran: provide a fallback implementation of issignaling