re PR fortran/90985 (Wrong error message with variables named "DATA*")
[gcc.git] / gcc / fortran / decl.c
index a7886b0efcd956afa664c6dad681cc719f537db0..1415b97267feb3f4db88a97f6c208ee1ec05b434 100644 (file)
@@ -621,6 +621,13 @@ gfc_match_data (void)
   gfc_expr *e;
   gfc_ref *ref;
   match m;
+  char c;
+
+  /* DATA has been matched.  In free form source code, the next character
+     needs to be whitespace.  Check that here.  */
+  c = gfc_peek_ascii_char ();
+  if (gfc_current_form == FORM_FREE && !gfc_is_whitespace (c))
+    return MATCH_NO;
 
   /* Before parsing the rest of a DATA statement, check F2008:c1206.  */
   if ((gfc_current_state () == COMP_FUNCTION