this is an enhancement for the -fwhole-file option. Like many other compilers
it would be good if gfortran would have a way (either default on not) to turn
the errors produced by -fwhole-file into just a warning. In particular, to
allow quasi-standard (type-cheating) abuse of procedures that are called but
have an implicit interface.
ifort: no options, no warnings
g95: no options, some warnings
nag: option (-dusty), warning
> cat test.f90
SUBROUTINE S1(Z)
REAL, DIMENSION(2,*) :: z
END SUBROUTINE S1
SUBROUTINE T1
COMPLEX, DIMENSION(10) :: z
call S1(z)
END SUBROUTINE T1
SUBROUTINE S2(D,N)
REAL, DIMENSION(N) :: D
END SUBROUTINE
SUBROUTINE T2
REAL, DIMENSION(:,:), POINTER :: D
ALLOCATE(D(2,2))
CALL S2(D(1,1),4)
END SUBROUTINE T2
--
Summary: allow type cheating for procedures with an implicit
interface
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jv244 at cam dot ac dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40006