aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f9020
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90 b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90
new file mode 100644
index 000000000..8bcdbb87a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.fortran-torture/execute/common_2.f90
@@ -0,0 +1,20 @@
+! PR fortran/16336 -- the two common blocks used to clash
+MODULE bar
+INTEGER :: I
+COMMON /X/I
+contains
+subroutine set_i()
+i = 5
+end subroutine set_i
+END MODULE bar
+
+USE bar
+INTEGER :: J
+COMMON /X/J
+j = 1
+i = 2
+if (j.ne.i) call abort()
+if (j.ne.2) call abort()
+call set_i()
+if (j.ne.5) call abort()
+END