program test
implicit none
call test()
contains
subroutine one(a)
real, dimension(:,:), intent(inout), optional :: a
call two(a)
end subroutine one
end program test
With 4.5:
f951: internal compiler error: in is_illegal_recursion,
at fortran/resolve.c:1120
With 4.4:
hfjffff.f90:3.13:
call test()
1
hfjffff.f90:1.12:
program test
2
Error: Global name 'test' at (1) is already being used as a PROGRAM at (2)
f951: internal compiler error: in is_illegal_recursion, at
fortran/resolve.c:1103
With 4.3:
hfjffff.f90:3.13:
call test()
1
hfjffff.f90:1.12:
program test
2
Error: Global name 'test' at (1) is already being used as a PROGRAM at (2)
hfjffff.f90:3.13:
call test()
1
Error: SUBROUTINE 'test' at (1) cannot call itself, as it is not RECURSIVE
With 4.2:
hfjffff.f90:3.11:
call test()
1
Error: PROGRAM attribute conflicts with PROCEDURE attribute at (1)
--
Summary: [4.4/4.5 Regression] ICE with "call foo" in "program
foo"
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41909