Commit 85d5c27d by Jerry DeLisle

re PR fortran/66461 (ICE on missing end program in fixed source)

2016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/66461
	* scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
	current locus back to old_locus.

	* gfortran.dg/unexpected_eof.f: New test

From-SVN: r236627
parent 4ddcdbf9
2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66461
* scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
current locus back to old_locus.
2016-05-20 Jakub Jelinek <jakub@redhat.com> 2016-05-20 Jakub Jelinek <jakub@redhat.com>
PR fortran/71204 PR fortran/71204
......
...@@ -1556,6 +1556,7 @@ restart: ...@@ -1556,6 +1556,7 @@ restart:
not_continuation: not_continuation:
c = '\n'; c = '\n';
gfc_current_locus = old_loc; gfc_current_locus = old_loc;
end_flag = 0;
done: done:
if (c == '\n') if (c == '\n')
......
2016-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/66461
* gfortran.dg/unexpected_eof.f: New test
2016-05-23 Michael Meissner <meissner@linux.vnet.ibm.com> 2016-05-23 Michael Meissner <meissner@linux.vnet.ibm.com>
Kelvin Nilsen <kelvin@gcc.gnu.org> Kelvin Nilsen <kelvin@gcc.gnu.org>
......
! { dg-do compile }
! PR66461 ICE on missing end program in fixed source
program p
integer x(2)
x = -1
if ( x(1) < 0 .or.
& x(2) < 0 ) print *, x
! { dg-error "Unexpected end of file" "" { target *-*-* } 0 }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment