Fortran - fix whitespace issue during parsing of assigned goto
gcc/fortran/ChangeLog: PR fortran/102113 * match.c (gfc_match_goto): Allow for whitespace in parsing list of labels. gcc/testsuite/ChangeLog: PR fortran/102113 * gfortran.dg/goto_9.f90: New test.
This commit is contained in:
parent
79a017c412
commit
a7083b83e4
2 changed files with 11 additions and 1 deletions
|
@ -4079,7 +4079,7 @@ gfc_match_goto (void)
|
|||
}
|
||||
while (gfc_match_char (',') == MATCH_YES);
|
||||
|
||||
if (gfc_match (")%t") != MATCH_YES)
|
||||
if (gfc_match (" )%t") != MATCH_YES)
|
||||
goto syntax;
|
||||
|
||||
if (head == NULL)
|
||||
|
|
10
gcc/testsuite/gfortran.dg/goto_9.f90
Normal file
10
gcc/testsuite/gfortran.dg/goto_9.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! { dg-do compile }
|
||||
! { dg-options "-std=legacy" }
|
||||
! PR fortran/102113 - parsing error in assigned goto
|
||||
|
||||
program p
|
||||
assign 10 to i
|
||||
goto i,(10,20 )
|
||||
10 continue
|
||||
20 continue
|
||||
end
|
Loading…
Add table
Reference in a new issue