[Bug fortran/40011] Problems with -fwhole-file
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Fri May 8 14:09:00 GMT 2009
------- Comment #17 from dominiq at lps dot ens dot fr 2009-05-08 14:09 -------
Thanks to the second program in
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c6621b97f448b516#
I think I have found a false positive for -fwhole-file (unpatched):
Implicit None
Interface
Subroutine sub( a, b, c )
Implicit None
Integer, Intent( In ) :: a
Integer, Intent( In ) :: b
Integer, Intent( In ), Optional :: c
End Subroutine sub
End Interface
call sub(1,2)
call sub(1,2,3)
end
subroutine sub(i,j,k)
Implicit None
Integer, Intent( In ) :: i
Integer, Intent( In ) :: j
Integer, Intent( In ), Optional :: k
intrinsic present
write(*,*)' 3 presence flag ',present(k)
write(*,*)' 1st arg ',i
write(*,*)' 2nd arg ',j
if (present(k)) then
write(*,*)' 3rd arg ',k
else
write(*,*)' 3rd arg is absent'
endif
return
end
[ibook-dhum] f90/bug% gfc -fwhole-file no_interface_1.f90
no_interface_1.f90:10.24:
call sub(1,2)
1
Error: Unexpected alternate return spec in subroutine call at (1)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
More information about the Gcc-bugs
mailing list