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 16:20:00 -0000	[thread overview]
Message-ID: <Prayer.1.3.5.1810041720520.23555@hermes-2.csi.cam.ac.uk> (raw)
In-Reply-To: <9A8B6E3D-D56C-45D0-93AE-8ED9EB0ADE1A@comcast.net>

On Oct 4 2018, Paul Koning wrote:
>> 
>> 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?
>
> That's what I expected and apparently I'm not the only one. But the 
> actual code says that the default REAL is the 4 byte one, and if the 
> compiler doesn't supply a float type of that size, the compiler crashes 
> at startup.

That's a design mistake, though I can see how it happened.  You do mean
4 byte, and not just REAL*4, though?  If the latter, you can just make
REAL*4 mean your default real and have done with it!  As I said, that
number is not always the size in bytes :-)

> Janne raises an interesting point, about Fortran requirements of int and 
> float and double sizes that I was not aware of. Given those, it seems 
> that the correct answer is to do the more traditional thing where "float" 
> (REAL) is SFmode, 4 bytes -- always. In other words, make -mfloat32 be 
> the only operating mode and retire that switch.

Not necessarily.  Another option is to simply pad default INTEGER and
DOUBLE PRECISION - that's a common solution, and fully conforming.  But
I don't know how hard that would be to do.

It's not relevant to the PDP11, but a lot of people feel that the correct
defaults for the modern world are 8 byte default integer and real, and
16 byte double precision.


Regards,
Nick Maclaren.



  reply	other threads:[~2018-10-04 16:20 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
2018-10-04 15:48       ` Paul Koning
2018-10-04 16:20         ` N.M. Maclaren [this message]
     [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.1810041720520.23555@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).