host association question
marco restelli
mrestelli@gmail.com
Sun Nov 19 19:24:00 GMT 2006
Hi,
the following code does not compile with gfortran, but
works "as expected" with ifort.
Is the code really non standard and the Intel compiler
allows it as an extension, or is gfortran wrong?
Thank you,
Marco
gfortran --version
GNU Fortran 95 (GCC) 4.1.1 (Gentoo 4.1.1-r1)
Copyright (C) 2006 Free Software Foundation, Inc.
(I don't have access to the new 4.2 gfortran)
program test_internal
implicit none
integer :: n
contains
function internal_f
real :: internal_f(n)
internal_f = 2
end function internal_f
end program test_internal
gfortran test_internal.f90 -o test_internal
In file test_internal.f90:9
real :: internal_f(n)
1
Error: Variable 'n' cannot appear in the expression at (1)
More information about the Fortran
mailing list