aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f9017
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f90
new file mode 100644
index 000000000..f84e91f25
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/mainsub.f90
@@ -0,0 +1,17 @@
+! Program to test compilation of subroutines following the main program
+program mainsub
+ implicit none
+ integer i
+ external test
+
+ i = 0
+ call test (i)
+ if (i .ne. 42) call abort
+end program
+
+subroutine test (p)
+ implicit none
+ integer p
+
+ p = 42
+end subroutine