This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: patch to add ISO_FORTRAN_ENV intrinsic module


Brooks Moses wrote:
> François-Xavier Coudert wrote:
>>   -- I think CHARACTER_STORAGE_SIZE and FILE_STORAGE_SIZE have value 8
>> on all the systems we currently support. For NUMERIC_STORAGE_SIZE,
>> however, I'm not sure what to do. [...]
>> When the compiler is used with -fdefault-real-8 or -fdefault-integer-8
>> (but not both), what the heck should the value of NUMERIC_STORAGE_SIZE
>> be?
> Well, when the compiler is used with one or the other (but not both)
> of those options, it's not a standard-comforming Fortran compiler, so
> the standard is quite silent on the matter.  The proper behavior is
> left up to us as a matter of opinion.
> Personally, since in that case NUMERIC_STORAGE_SIZE does not have any
> consistent meaning, I'd prefer for any references to it to throw an
> error.  I imagine that throwing a specific descriptive error would be
> difficult, but would it be possible to simply leave it undefined in
> that case?
How about leaving it to e.g. 32 and spitting out a warning when one
loads the module and has -fdefault-integer-8 XOR -fdefault-integer-8 set.

I'm not so happy with bogus values as they are not so easy to track.

Other compilers:

NAG f95 writes "32" also with -r8, using "-double" it has also "32" but
during compilation it shows:
Warning: intrmod.f90, line 2: Incompatible option setting for module
ISO_FORTRAN_ENV (was not compiled with the -double option
(Here, f95 is a real module (in nag/lib/iso_fortran_env.{f90,mod}) and
the warning is probably always shown for "-double".)

By the way: g95 has always "32" using -r8, -i8 and -d8 (= "-r8 -i8").
And sunf95 has "8" (bits), which looks like a bug. The "8" remains also
with -r8const.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]