aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/match.c2
-rw-r--r--gcc/testsuite/gfortran.dg/goto_9.f9010
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c
index 16502da..53a575e 100644
--- a/gcc/fortran/match.c
+++ b/gcc/fortran/match.c
@@ -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)
diff --git a/gcc/testsuite/gfortran.dg/goto_9.f90 b/gcc/testsuite/gfortran.dg/goto_9.f90
new file mode 100644
index 0000000..e05e738
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/goto_9.f90
@@ -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