OSDN Git Service

2005-11-06 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / data_initialized.f90
diff --git a/gcc/testsuite/gfortran.dg/data_initialized.f90 b/gcc/testsuite/gfortran.dg/data_initialized.f90
new file mode 100644 (file)
index 0000000..56cf059
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+! Tests fix for PR17737 - already initialized variable cannot appear
+! in data statement
+      integer :: i, j = 1
+      data i/0/
+      data i/0/   ! { dg-error "Extension: re-initialization" }
+      data j/2/   ! { dg-error "Extension: re-initialization" }
+      end
+