public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: Paul Koning <paulkoning@comcast.net>
Cc: Richard Biener <richard.guenther@gmail.com>,
	   "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: Target control of Fortran options
Date: Thu, 04 Oct 2018 15:41:00 -0000	[thread overview]
Message-ID: <Prayer.1.3.5.1810041641210.8054@hermes-2.csi.cam.ac.uk> (raw)
In-Reply-To: <01899EC4-4F6C-4592-AFB6-D29DA79F1BCB@comcast.net>

On Oct 4 2018, Paul Koning wrote:
>
> It appears that Fortran has a different approach. Fortran has syntax like 
> "REAL*8" to request a float of a specific size. And what gfortran does is 
> assume that "REAL" without a size specifier means "REAL*n" for a well 
> known fixed n. Without switches, n is 4, which is indeed the common 
> answer. But in my case, there isn't any 4-byte float type unless you say 
> -mfloat32.

If you don't have a 4-byte REAL, why do you make default REAL 4 bytes?
Do you mean that the front-end code assumes that it is?  In which case,
I would say that it's a clear design bug!  If not, why not just set it to
your basic floating type?

It's commonly 8 bytes on machines where that is the basic real size (e.g.
Cray vector systems); I don't know if gfortran supports any such systems,
but that's the approach that is universally taken for them.  In fact,
mapping REAL*4 to 8 bytes is quite common with precision-extension options
in some compilers, and your implementation sounds similar. 

I assume that you know that REAL*n isn't a standard Fortran facility, and
the "n" isn't always the size in bytes.  For the standard equivalent,
what does your version map REAL(SELECTED_REAL_SIZE(6)) to?


Regards,
Nick Maclaren.


  reply	other threads:[~2018-10-04 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 21:04 Paul Koning
2018-10-04  8:06 ` Richard Biener
2018-10-04 14:04   ` Paul Koning
2018-10-04 15:41     ` N.M. Maclaren [this message]
2018-10-04 15:48       ` Paul Koning
2018-10-04 16:20         ` N.M. Maclaren
     [not found]     ` <CAO9iq9F0oW35Ke3PjHM1hgZ_vjyq5H_gLYy=zLyUB5x1xBxrrg@mail.gmail.com>
2018-10-04 18:51       ` Paul Koning
2018-10-05  8:44         ` N.M. Maclaren

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=Prayer.1.3.5.1810041641210.8054@hermes-2.csi.cam.ac.uk \
    --to=nmm1@cam.ac.uk \
    --cc=fortran@gcc.gnu.org \
    --cc=paulkoning@comcast.net \
    --cc=richard.guenther@gmail.com \
    /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: link
Be 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).