re PR fortran/38252 (Empty function with CONTAINS triggers Internal Error)

2008-12-01  Mikael Morin  <mikael.morin@tele2.fr>

	PR fortran/38252
	* parse.c (parse_spec): Skip statement order check in case
	of a CONTAINS statement.

2008-12-01  Mikael Morin  <mikael.morin@tele2.fr>

	PR fortran/38252
	* gfortran.dg/empty_function_1.f90: New test.

From-SVN: r142327
This commit is contained in:
Mikael Morin 2008-12-01 20:30:55 +01:00 committed by Mikael Morin
parent 7f05b779ce
commit 34d5d95884
4 changed files with 42 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2008-12-01 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38252
* parse.c (parse_spec): Skip statement order check in case
of a CONTAINS statement.
2008-11-30 Daniel Kraft <d@domob.eu>
PR fortran/37779

View File

@ -2338,7 +2338,7 @@ loop:
{
bool verify_now = false;
if (st == ST_END_FUNCTION)
if (st == ST_END_FUNCTION || st == ST_CONTAINS)
verify_now = true;
else
{

View File

@ -1,3 +1,8 @@
2008-12-01 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38252
* gfortran.dg/empty_function_1.f90: New test.
2008-12-01 Uros Bizjak <ubizjak@gmail.com>
PR rtl-optimization/33642

View File

@ -0,0 +1,30 @@
! { dg-do compile }
!
! PR fortran/38252
! FUNCTION rejected if both specification and execution part are empty
!
! Contributed by Daniel Kraft <d@domob.eu>
INTEGER FUNCTION test ()
CONTAINS
END FUNCTION test
! { dg-do compile }
!
! PR fortran/38252
! FUNCTION rejected if both specification and execution part are empty
!
! Contributed by Daniel Kraft <d@domob.eu>
INTEGER FUNCTION test ()
CONTAINS
END FUNCTION test
! { dg-do compile }
!
! PR fortran/38252
! FUNCTION rejected if both specification and execution part are empty
!
! Contributed by Daniel Kraft <d@domob.eu>
INTEGER FUNCTION test ()
CONTAINS
END FUNCTION test