From: Richard Biener <richard.guenther@gmail.com>
To: Paul Koning <paulkoning@comcast.net>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: Target control of Fortran options
Date: Thu, 04 Oct 2018 08:06:00 -0000 [thread overview]
Message-ID: <CAFiYyc2fnoxLWwkBEE0Zyr1ic1KPO3O+GObtyiVfQZMyb9T-oQ@mail.gmail.com> (raw)
In-Reply-To: <984F5B1C-CAFB-4131-A90F-3805D674857B@comcast.net>
On Wed, Oct 3, 2018 at 11:04 PM Paul Koning <paulkoning@comcast.net> wrote:
>
> In the C and C++ parts of GCC, the target has some ways to adjust the compiler options depending on target settings. I'm looking for a way to do that with gfortran.
>
> The specific issue is in pdp11, which has an option to specify that "float" is 8 bytes (same as "double") rather than 4 bytes. And the 8 byte choice is the default.
>
> As a result, if I invoke gfortran for that target, I get an ICE because real*4 can't be found. If I say -fdefault-real-8 it works.
>
> So what I'm hoping to do is to have the target switch processing code (for the TARGET_HANDLE_OPTION hook) react to the -mfloat32 and -mfloat64 switches by passing appropriate -fdefault-real-* switches to Fortran. Is that possible?
I think Fortran has to do it the same way the C family does.
float/double get assigned
by looking at FLOAT_TYPE_SIZE / [LONG_]DOUBLE_TYPE_SIZE. Iff that's not good
for the Fortran FE we'd have to define additional target hooks the FE can use.
Richard.
> paul
>
next prev parent reply other threads:[~2018-10-04 8:06 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 [this message]
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
[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=CAFiYyc2fnoxLWwkBEE0Zyr1ic1KPO3O+GObtyiVfQZMyb9T-oQ@mail.gmail.com \
--to=richard.guenther@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=paulkoning@comcast.net \
/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).