[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Sep 26 08:38:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517
--- Comment #2 from janus at gcc dot gnu.org 2011-09-26 08:09:09 UTC ---
Unfortunately, gfortran also does not reject it if the types actually differ:
program main
type t
integer :: i
end type
type u
real :: r
end type
type(u), external :: ufunction
call sub(ufunction) ! gfortran should emit an error message here
contains
subroutine sub(tfunction)
type(t), external :: tfunction
end subroutine
end program
When exchanging type(u)/type(t) for integer/real, the check works:
call sub(ufunction) ! gfortran should emit an error message here
1
Error: Interface mismatch in dummy procedure 'tfunction' at (1): Type/kind
mismatch in return value of 'ufunction'
More information about the Gcc-bugs
mailing list