2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/77972
* scanner.c (gfc_next_char_literal): If nextc is null do not
decrement the pointer and call the diagnostics.
PR fortran/77972
* gfortran.dg/unexpected_eof_4.f90: New test.
From-SVN: r241201
+2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/77972
+ * scanner.c (gfc_next_char_literal): If nextc is null do not
+ decrement the pointer and call the diagnostics.
+
2016-10-14 Andre Vehreschild <vehre@gcc.gnu.org>
* resolve.c (resolve_symbol): Add unimplemented message for
if (c != '&')
{
- if (in_string)
+ if (in_string && gfc_current_locus.nextc)
{
- if (gfc_current_locus.nextc)
- gfc_current_locus.nextc--;
+ gfc_current_locus.nextc--;
if (warn_ampersand && in_string == INSTRING_WARN)
gfc_warning (OPT_Wampersand,
"Missing %<&%> in continued character "
+2016-10-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/77972
+ * gfortran.dg/unexpected_eof_4.f90: New test.
+
2016-10-15 Janne Blomqvist <jb@gcc.gnu.org>
PR libfortran/48587
--- /dev/null
+! { dg-do compile }
+! { dg-options "-Wampersand" }
+! PR77972
+program p
+ character(8) :: z
+ z = 'abc&
+! { dg-error "Unterminated character constant" "" { target *-*-* } 0 }
+! { dg-error "Unexpected end of file" "" { target *-*-* } 0 }