summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/common_6.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/common_6.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/common_6.f9010
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/common_6.f90 b/gcc/testsuite/gfortran.dg/common_6.f90
new file mode 100644
index 000000000..8cef179e7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_6.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR 23765 : We used to incorrectly accept common blocks with no symbols
+common ! { dg-error "Syntax error" }
+common // ! { dg-error "Syntax error" }
+common /a/ ! { dg-error "Syntax error" }
+common /b/x/c/ ! { dg-error "Syntax error" }
+common y/d/ ! { dg-error "Syntax error" }
+common /e//f/ ! { dg-error "Syntax error" }
+common ///g/ ! { dg-error "Syntax error" }
+end