diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/invalid_contains_1.f90 | 8 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/invalid_contains_2.f90 | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 58d3b77..3990087 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,11 @@ 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. diff --git a/gcc/testsuite/gfortran.dg/invalid_contains_1.f90 b/gcc/testsuite/gfortran.dg/invalid_contains_1.f90 new file mode 100644 index 0000000..757751d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/invalid_contains_1.f90 @@ -0,0 +1,8 @@ +! { 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 diff --git a/gcc/testsuite/gfortran.dg/invalid_contains_2.f90 b/gcc/testsuite/gfortran.dg/invalid_contains_2.f90 new file mode 100644 index 0000000..90be10f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/invalid_contains_2.f90 @@ -0,0 +1,9 @@ +! { 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" } |