host association question

Dominique Dhumieres dominiq@lps.ens.fr
Sun Nov 19 20:50:00 GMT 2006


> Looks like a bug in gfortran.  Can you submit a bug report?

I think the code is invalid:

function internal_f
                  1
Error: Expected formal argument list in function definition at (1)
bad_func.f90:9.22:

 real :: internal_f(n)
                     1
Error: Symbol 'internal_f' at (1) has already been host associated
bad_func.f90:11.10:

internal_f = 2
         1
Error: Symbol 'internal_f' at (1) has already been host associated
bad_func.f90:13.3:

end function internal_f
  1
Error: Expecting END PROGRAM statement at (1)

with gcc-4.3-20061118.

This has been an extension in the early versions of gfortran,
but it is now following the standard.

function internal_f

is an ifort extension (bad one in my opinion) and should be
something like:

function internal_f()

Dominique



More information about the Fortran mailing list