* parse.c (next_free): Check for whitespace after the label.
* match.c (gfc_match_small_literal_int): Initialize cnt variable.
* gfortran.dg/label_2.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@109246
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-01-02 Steven G. Kargl <kargls@comcast.net>
+
+ PR fortran/24640
+ * parse.c (next_free): Check for whitespace after the label.
+ * match.c (gfc_match_small_literal_int): Initialize cnt variable.
+
2006-01-01 Steven G. Kargl <kargls@comcast.net>
* ChangeLog: Split previous years into ...
gfc_gobble_whitespace ();
c = gfc_next_char ();
+ *cnt = 0;
if (!ISDIGIT (c))
{
do
c = gfc_next_char ();
while (ISDIGIT(c));
+
+ if (!gfc_is_whitespace (c))
+ gfc_error_now ("Non-numeric character in statement label at %C");
+
}
else
{
+2006-01-02 Steven G. Kargl <kargls@comcast.net>
+
+ PR fortran/24640
+ * gfortran.dg/label_2.f90: New test.
+
2006-01-02 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* g++.dg/lookup/using12.C: Tighten error marker.
--- /dev/null
+! { dg-do compile }
+! PR fortran/24640. We needed to check that whitespace follows
+! a statement label in free form.
+!
+program pr24640
+
+10: a=10 ! { dg-error "character in statement" }
+
+end program
+