From: jvdelisle Date: Wed, 6 Jun 2007 01:21:29 +0000 (+0000) Subject: 2007-06-05 Jerry DeLisle X-Git-Tag: upstream/4.9.2~48297 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=540d5745fa907c24f1547406d85681e33b5e7968;p=platform%2Fupstream%2Flinaro-gcc.git 2007-06-05 Jerry DeLisle PR testsuite/18923 * gfortran.dg/invalid_contains_1.f90: New test. * gfortran.dg/invalid_contains_2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125353 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 + PR testsuite/18923 + * gfortran.dg/invalid_contains_1.f90: New test. + * gfortran.dg/invalid_contains_2.f90: New test. + +2007-06-05 Jerry DeLisle + 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" }