blob: 69e8107d63cff92fb85d34a4ffdc64e9b5827bbd [file] [log] [blame]
! { dg-do link }
! { dg-options "-fwhole-program -O3 -g" }
!
! PR fortran/40873
!
program prog
call one()
call two()
call test()
end program prog
subroutine one()
call three()
end subroutine one
subroutine two()
call three()
end subroutine two
subroutine three()
end subroutine three
SUBROUTINE c()
CALL a()
END SUBROUTINE c
SUBROUTINE a()
END SUBROUTINE a
MODULE M
CONTAINS
SUBROUTINE b()
CALL c()
END SUBROUTINE
END MODULE
subroutine test()
USE M
CALL b()
END