OSDN Git Service

fortran/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / contains.f90
diff --git a/gcc/testsuite/gfortran.dg/contains.f90 b/gcc/testsuite/gfortran.dg/contains.f90
new file mode 100644 (file)
index 0000000..221488a
--- /dev/null
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+! Check whether empty contains are allowd
+! PR fortran/29806
+module x
+ contains
+end module x ! { dg-error "CONTAINS statement without FUNCTION or SUBROUTINE statement" }
+
+program y
+  contains
+end program y ! { dg-error "CONTAINS statement without FUNCTION or SUBROUTINE statement" }