diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 974ee46d9fe..bf9fe04d748 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-02-14 Jerry DeLisle + + PR fortran/30779 + * scanner.c (gfc_next_char_literal): Add check for end of file after + call to advance_line. + 2007-02-14 Steven G. Kargl PR fortran/30799 diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index 8667fbc6767..1f1593b3d15 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -704,6 +704,9 @@ restart: skip_comment_line (); else gfc_advance_line (); + + if (gfc_at_eof()) + goto not_continuation; /* We've got a continuation line. If we are on the very next line after the last continuation, increment the continuation line count and