F90-related question

Janus Weil janus@gcc.gnu.org
Mon Dec 9 17:53:00 GMT 2013


Hi Steve,

>> > I have a question about an old compilation line. It used to be " f90 +r8 -c
>> > -O3 *.f  ", and now I would like to use gfortran instead of f90.
>> >
>> > The question is only about the "+r8" option. I cannot find an equivalent to
>> > it so I assume it is defaulted in gfortran, but I would like a confirmation
>> > for that.
>>
>> I guess you are looking for something like -fdefault-real-8, see
>> http://gcc.gnu.org/onlinedocs/gcc-4.8.2/gfortran/Fortran-Dialect-Options.html
>
> He probably wants -freal-4-real-8.  -fdefault-real-8 has a few
> issues.

can you illuminate us what kind of 'issues' you are talking about?


> Presonally, I would like to deprecate the -fdefault-*
> options, but I also recognize that these are too entrenched in
> the users' brain.

Before deprecating it, maybe a first step would be to enhance the
documentation to
a) mention that -freal-4-real-8 might be preferable over -fdefault-real-8 and
b) explain why.

Patches welcome ...


> PS:  The real solution is to use no option; rather fix the code
> to properly declare all entities.

That is true. However, doing so for legacy code can be quite
cumbersome. I think the conversion options are definitely useful for
many people and we should be careful about deprecating any of them
prematurely.

Cheers,
Janus



More information about the Fortran mailing list