Commit 99f1e970 by Steven G. Kargl Committed by Steven G. Kargl

re PR fortran/24640 ([4.1] ice with invalid label)

PR fortran/24640
* 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.

From-SVN: r109246
parent a9cc9cc6
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 ...
......
......@@ -151,6 +151,7 @@ gfc_match_small_literal_int (int *value, int *cnt)
gfc_gobble_whitespace ();
c = gfc_next_char ();
*cnt = 0;
if (!ISDIGIT (c))
{
......
......@@ -334,6 +334,10 @@ next_free (void)
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.
! { 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
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