public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/95640] gfortran ieee_selected_real_kind returns 10 Date: Thu, 11 Jun 2020 14:56:58 +0000 [thread overview] Message-ID: <bug-95640-4-pE6VflMbsl@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95640-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95640 kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org Depends on| |69101 --- Comment #3 from kargl at gcc dot gnu.org --- (In reply to Bill Long from comment #0) > > cat test.f90 > 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. IEEE-754 permits the extended double type (See 3.7 Extended and extendable precisions). I do not see in the Fortran standard that the output from ieee_seleted_real_kind must select binary32, binary64, or binary128. That said, ieee_selected_real_kind is completely broken. See PR69101. I used to have patch that fixed this PR, but never got around to committing it. The patch attached in 69101 is not correct. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69101 [Bug 69101] [F03] IEEE_SELECTED_REAL_KIND is not generic
next prev parent reply other threads:[~2020-06-11 14:56 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-11 13:29 [Bug fortran/95640] New: " 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 [this message] 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
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-95640-4-pE6VflMbsl@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: linkBe 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).