1! Program to test compilation of subroutines following the main program
2program mainsub
3 implicit none
4 integer i
5 external test
6
7 i = 0
8 call test (i)
9 if (i .ne. 42) call abort
10end program
11
12subroutine test (p)
13 implicit none
14 integer p
15
16 p = 42
17end subroutine
18