public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95640] New: gfortran ieee_selected_real_kind returns 10
@ 2020-06-11 13:29 longb at cray dot com
  2020-06-11 13:34 ` [Bug fortran/95640] " longb at cray dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: longb at cray dot com @ 2020-06-11 13:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95640
           Summary: gfortran ieee_selected_real_kind returns 10
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: longb at cray dot com
  Target Milestone: ---

> cat test.f90

program test
  use,intrinsic :: ieee_arithmetic

  print *, "     selected_real_kind(16) = ", selected_real_kind(16)
  print *, "ieee_selected_real_kind(16) = ", ieee_selected_real_kind(16)
end program test

Cray: 

> ftn test.f90
> ./a.out
     selected_real_kind(16) = 16
ieee_selected_real_kind(16) = 16

Intel:

> module swap PrgEnv-cray PrgEnv-intel
> ifort test.f90
> ./a.out
     selected_real_kind(16) = 16
ieee_selected_real_kind(16) = 16

Gfortran: 

> module swap PrgEnv-intel PrgEnv-gnu
> gfortran test.f90
> ./a.out
     selected_real_kind(16) = 10
ieee_selected_real_kind(16) = 10



The output from gfortran is problematic because ieee_selected_real_kind should
not return 10.   If the users want KIND=10 (i.e. the Intel-proprietary 80-bit
x87 floats), then they need to use selected_real_kind and not the IEEE version.

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

end of thread, other threads:[~2021-01-29 12:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-11 13:29 [Bug fortran/95640] New: gfortran ieee_selected_real_kind returns 10 longb at cray dot com
2020-06-11 13:34 ` [Bug fortran/95640] " longb at cray dot com
2020-06-11 13:51 ` dominiq at lps dot ens.fr
2020-06-11 14:56 ` kargl at gcc dot gnu.org
2020-06-11 15:42 ` sgk at troutmask dot apl.washington.edu
2020-06-11 16:12 ` longb at cray dot com
2020-06-11 16:21 ` longb at cray dot com
2020-06-11 16:50 ` sgk at troutmask dot apl.washington.edu
2020-06-11 17:14 ` sgk at troutmask dot apl.washington.edu
2020-06-11 20:07 ` sgk at troutmask dot apl.washington.edu
2020-06-12  1:43 ` kargl at gcc dot gnu.org
2020-06-12  2:52 ` longb at cray dot com
2020-06-12  4:16 ` kargl at gcc dot gnu.org
2020-06-12  5:40 ` sgk at troutmask dot apl.washington.edu
2020-06-12 15:33 ` anlauf at gcc dot gnu.org
2020-06-12 15:54 ` sgk at troutmask dot apl.washington.edu
2020-06-12 23:33 ` sgk at troutmask dot apl.washington.edu
2020-06-13 10:14 ` pinskia at gcc dot gnu.org
2020-06-13 16:19 ` sgk at troutmask dot apl.washington.edu
2020-10-02 21:54 ` longb at cray dot com
2021-01-26 16:24 ` longb at cray dot com
2021-01-29 12:17 ` burnus 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).