[Bug fortran/66461] [4.9/5/6/7 Regression] ICE on missing end program in fixed source

jvdelisle at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon May 23 02:55:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66461

--- Comment #22 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
This patch, by itself, fixes the whole issue.

Regression tested on x86-64.

Mikael shook the old brain cells.

diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index f4dedd69..6a7a5b68 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -1556,6 +1556,7 @@ restart:
 not_continuation:
   c = '\n';
   gfc_current_locus = old_loc;
+  end_flag = 0;

 done:
   if (c == '\n')

One of them notorious one liners.

Thanks all for the help.


More information about the Gcc-bugs mailing list