summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.fortran-torture/execute/args.f90
blob: 263c795ed70fb2dc78ce0ff940dd4620cf2fc05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
! Program to test procudure args
subroutine test (a, b)
   integer, intent (IN) :: a
   integer, intent (OUT) :: b

   if (a .ne. 42) call abort
   b = 43
end subroutine

program args
   implicit none
   external test
   integer i, j

   i = 42
   j = 0
   CALL test (i, j)
   if (i .ne. 42) call abort
   if (j .ne. 43) call abort
   i = 41
   CALL test (i + 1, j)
end program