This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/82143] add a -fdefault-real-16 flag
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Sep 2017 11:05:58 +0000
- Subject: [Bug fortran/82143] add a -fdefault-real-16 flag
- Auto-submitted: auto-generated
- References: <bug-82143-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82143
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to janus from comment #0)
> gfortran currently knows the options -fdefault-real-8 and -fdefault-double-8.
>
> It would be useful to add an -fdefault-real-16 (corresponding to ifort's
> -real-size 128) and maybe also -fdefault-double-16.
>
> For completeness, also -fdefault-real-4 might be worth adding (which would
> correspond to the current default behavior).
Actaully, the -fdefault-real* and -fdefault-integer-* options
should be deprecated. These options are broken by design, and
probably do not do what one wants. Use the -freal-4-real-16
(and similar options).
% cat cat a.f90
program foo
real x
x = 1. / 3.
print *, x
end program foo
% gfortran6 -static -o z a.f90 && ./z
0.333333343
% gfortran6 -static -o z -freal-4-real-16 a.f90 && ./z
0.333333333333333333333333333333333317