[gfortran,patch] add ISO_FORTRAN_ENV intrinsic module
Tobias Burnus
burnus@net-b.de
Sat Nov 4 13:43:00 GMT 2006
Hi,
Tobias Burnus wrote:
> Maybe one should give a better error message for:
>
> use, intrinsic iso_fortran_env
> 1
> Error: Unclassifiable statement at (1)
>
> This usage is invalid in Fortran 2003, however g95, NAG f95 and ifort
> accept this and if it works with several compilers and you see this
> message with the gfortran, you may wrongly assume either that gfortran
> has a bug or does not support (non_)intrinsic.
> Suggested fix: Accept it with -std=gnu, reject it with a nice error with
> -std=f2003.
>
Just for completeness: I filled bugreports for g95, NAG f95 and ifort to
give at least a warning (with -std=f2003, -f2003, -stand f03) and I
tested with sunf95:
use,intrinsic iso_fortran_env,only: stdErr => error_unit
^
"iso_const.f90", Line = 2, Column = 16: ERROR: Unexpected syntax: "::"
was expected but found "I".
I'm still unsure whether one should accept it with -std=gnu or reject it
always?
sunf95 also gives a (default) warning which we might also want to give:
If a module exists as intrinsic and as non_intrinsic module, sunf95 writes:
use iso_fortran_env,only: stdErr => error_unit
^
"iso_const.f90", Line = 2, Column = 6: WARNING: This name of
nonintrinsic module may disguise the name of intrinsic module
ISO_FORTRAN_ENV
I don't know whether we want to follow suit (default warning or only
with a -W* option).
Tobias
More information about the Gcc-patches
mailing list