This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: gfortran problems
Hello,
spielmann@th.physik.uni-frankfurt.de wrote:
> so my problem is that if i try to compile the codes with the gfortran
> compiler i got several errors...
>
Well, I only found one (and a larger number of warnings, which can
presumably be ignored).
The error is
> output.f:357.27:
>
> ITMAXf=MAX(ITMAXf,ITT(Kf))
> 1
> Fehler: Argument »a2« des intrinsischen »max« bei (1) muss INTEGER(4) sein
>
ERROR: 'a2' argument of 'max' intrinsic at (1) must be INTEGER(4)
You are mixing arguments of different types, e.g.,
MAX(integer_variable, real_variable)
The error message appeared because ITT is not INTEGER(4). A workaround
(or solution) would be:
ITMAXf = max(ITMAXf, int(ITT(Kf))
I have no idea whether that makes sense or not as I don't know the context.
Tobias
PS: The error message is in line with the error given by other
compilers. One problem is the ambiguity of the return value. Should an
INTEGER or, e.g., a REAL be returned by MAX?