public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/106579] New: ieee_signaling_nan problem in fortran on powerpc64
@ 2022-08-10 15:14 seurer at gcc dot gnu.org
  2022-08-10 17:51 ` [Bug fortran/106579] " jakub at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: seurer at gcc dot gnu.org @ 2022-08-10 15:14 UTC (permalink / raw)
  To: gcc-bugs

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 <fxcoudert@gcc.gnu.org>
Date:   Mon Jan 17 12:46:48 2022 +0100

    Fortran: provide a fallback implementation of issignaling

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

end of thread, other threads:[~2022-08-30  9:11 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-10 15:14 [Bug fortran/106579] New: ieee_signaling_nan problem in fortran on powerpc64 seurer at gcc dot gnu.org
2022-08-10 17:51 ` [Bug fortran/106579] " jakub at gcc dot gnu.org
2022-08-10 22:46 ` segher at gcc dot gnu.org
2022-08-11  7:52 ` fxcoudert at gcc dot gnu.org
2022-08-11  9:55 ` jakub at gcc dot gnu.org
2022-08-11 11:26 ` fxcoudert at gcc dot gnu.org
2022-08-11 16:22 ` jakub at gcc dot gnu.org
2022-08-11 20:35 ` jakub at gcc dot gnu.org
2022-08-12 11:19 ` jakub at gcc dot gnu.org
2022-08-12 17:15 ` jakub at gcc dot gnu.org
2022-08-26  7:53 ` cvs-commit at gcc dot gnu.org
2022-08-26  7:56 ` cvs-commit at gcc dot gnu.org
2022-08-26  8:05 ` jakub at gcc dot gnu.org
2022-08-29 10:06 ` cvs-commit at gcc dot gnu.org
2022-08-29 10:06 ` cvs-commit at gcc dot gnu.org
2022-08-30  9:10 ` 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).