2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR testsuite/18923
* gfortran.dg/invalid_contains_1.f90: New test.
* gfortran.dg/invalid_contains_2.f90: New test.
From-SVN: r125353
2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+ PR testsuite/18923
+ * gfortran.dg/invalid_contains_1.f90: New test.
+ * gfortran.dg/invalid_contains_2.f90: New test.
+
+2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
PR testsuite/32057
* gfortran.dg/secnds.f: Update test to avoid roundoff errors and
midnight issues.
--- /dev/null
+! { dg-do compile }
+! PR18923 segfault after subroutine name confusion.
+module FOO
+contains
+ subroutine FOO ! { dg-error "conflicts with PROCEDURE" }
+ character(len=selected_int_kind(0)) :: C ! { dg-error "data declaration statement" }
+ end subroutine ! { dg-error "Expecting END MODULE statement" }
+end ! { dg-warning "CONTAINS statement without FUNCTION" }
\ No newline at end of file
--- /dev/null
+! { dg-do compile }
+! PR18923 segfault after subroutine name confusion.
+program foo
+contains
+ subroutine foo(i) ! { dg-error "conflicts with PROCEDURE" }
+ integer :: i ! { dg-error "data declaration statement" }
+ character(len=selected_int_kind(i)) :: c ! { dg-error "data declaration statement" }
+ end subroutine ! { dg-error "Expecting END PROGRAM statement" }
+end program foo ! { dg-warning "CONTAINS statement without FUNCTION" }