[patch, fortran] PR30779 incomplete file triggers ICE
Jerry DeLisle
jvdelisle@verizon.net
Thu Feb 15 06:22:00 GMT 2007
:ADDPATCH fortran:
Hi All,
This trivial patch checks if an end of file occurred after the advance_line is
called. The ICE results when trying to access a locus which is NULL in this
situation. The solution is to simply jump out. Allowing other error processing
to occur.
Regression tested on x86-64 Linux.
I will commit to trunk under the obvious rule.
Regards,
Jerry
2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/30779
* scanner.c (gfc_next_char_literal): Add check for end of file after
call to advance_line.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: error_recovery_3.f90
Type: text/x-fortran
Size: 264 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070215/c9576df9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr30779.diff
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070215/c9576df9/attachment-0001.bin>
More information about the Fortran
mailing list