aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f9022
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f90
new file mode 100644
index 000000000..263c795ed
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/args.f90
@@ -0,0 +1,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