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
This commit is contained in:
parent
a9cc9cc69a
commit
99f1e97091
5 changed files with 26 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
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
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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.
|
||||
|
|
10
gcc/testsuite/gfortran.dg/label_2.f90
Normal file
10
gcc/testsuite/gfortran.dg/label_2.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! { 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
|
||||
|
Loading…
Add table
Reference in a new issue