Tobias,
> However, after I wrote that, I saw that there is a dg-*
> which permits to check the .mod file for a string.
Are you sure it works now the *.mod files are gzipped?
AFAICT it does not.
The following test
MODULE generalFunctions
USE, INTRINSIC :: ISO_FORTRAN_ENV
IMPLICIT NONE
INTEGER, PARAMETER :: DP = REAL64
CONTAINS
REAL(DP) FUNCTION random()
CALL RANDOM_NUMBER(random)
END FUNCTION random
END MODULE generalFunctions
PROGRAM bugFind
USE generalFunctions
IMPLICIT NONE
REAL(DP), parameter :: half = 1.0_DP/2.0_DP
INTEGER:: i, ih(4)
ih = 0
DO i=1,40000
if (random() < half) then
if (random() < half) then
ih(1) = ih(1) + 1
else
ih(2) = ih(2) + 1
end if
else
if (random()<half) then
ih(3) = ih(3) + 1
else
ih(4) = ih(4) + 1
end if
end if
END DO
print *, ih
if (any (abs (ih-10000) > 300)) call abort()
END PROGRAM bugFind
succeeds with your patch, but without it. However if the module is put
in a different file it does not.
Dominique