A patch to fix the most obvious failures with -fwhole-file (take 2)
Dominique Dhumieres
dominiq@lps.ens.fr
Mon Dec 14 16:52:00 GMT 2009
> > + call gee_i(int(i**(-huge(0_8)-1_8),kind=kind(i)))
>
> This is simply code obfuscation with no merit. ...
Had you run the test yourself, you'ld have seen
Warning: Type mismatch in argument 'i' at (1); passed INTEGER(8) to INTEGER(4)
In
subroutine gee_i(i)
integer :: i
end subroutine gee_i
gee_i expects an integer, i**(-huge(0_8)-1_8) is integer(8) even if i is
integer, unless the promotion of i to integer(8) to compute the power
is a gfortran bug.
> > + if (i == 0) call abort()
I probably added these lines to remove some extra warnings (if you care
you can apply the patch and see what's happen!-).
Note that test exposed pr41043.
Dominique
More information about the Fortran
mailing list