re PR fortran/24176 (gfortran segfaults on empty source)

2005-10-05  Richard Guenther  <rguenther@suse.de>

	PR fortran/24176
	* parse.c (gfc_parse_file): Exit early for empty files.

	* gfortran.fortran-torture/compile/empty.f90: New testcase.

From-SVN: r104984
This commit is contained in:
Richard Guenther 2005-10-05 09:38:29 +00:00 committed by Richard Biener
parent 1767cc4fa9
commit c82cdb5dfc
4 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-10-05 Richard Guenther <rguenther@suse.de>
PR fortran/24176
* parse.c (gfc_parse_file): Exit early for empty files.
2005-10-03 Steve Ellcey <sje@cup.hp.com>
* fortran/trans-types.c (gfc_init_kinds): Only pass float, double,

View File

@ -2560,6 +2560,10 @@ gfc_parse_file (void)
seen_program = 0;
/* Exit early for empty files. */
if (gfc_at_eof ())
goto done;
loop:
gfc_init_2 ();
st = next_statement ();

View File

@ -1,3 +1,8 @@
2005-10-05 Richard Guenther <rguenther@suse.de>
PR fortran/24176
* gfortran.fortran-torture/compile/empty.f90: New testcase.
2005-10-05 Nathan Sidwell <nathan@codesourcery.com>
PR c++/23513