summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/global_references_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/global_references_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/global_references_2.f9013
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/global_references_2.f90 b/gcc/testsuite/gfortran.dg/global_references_2.f90
new file mode 100644
index 000000000..bf2528006
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/global_references_2.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
+! This program tests the patch for PR25964. This is a
+! regression that would not allow a common block and a statement
+! to share the same name.
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+ common /foo/ a, b, c
+ foo (x) = x + 1.0
+ print *, foo (0.0)
+ end
+