Commit 518a0b78 by Jerry DeLisle

re PR fortran/18923 (segfault after subroutine name confusion)

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
parent 766a8f62
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.
! { 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
! { 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" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment