summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/data_constraints_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/data_constraints_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/data_constraints_2.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/data_constraints_2.f90 b/gcc/testsuite/gfortran.dg/data_constraints_2.f90
new file mode 100644
index 000000000..46de3c814
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/data_constraints_2.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+! Tests constraints for variables in a data statement that are commonly
+! relaxed.
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+ common // a
+ common /b/ c
+ integer d
+ data a /1/ ! { dg-error "common block variable" }
+ data c /2/ ! { dg-error "common block variable" }
+ data d /3/
+ data d /4/ ! { dg-error " re-initialization" }
+end