From 172b87995cadacf87ba6ce1517b8a49acc3db0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= Date: Wed, 15 Dec 2004 19:55:57 +0100 Subject: re PR fortran/18993 (incorrect parsing in fixed-form) fortran/ PR fortran/18993 * match.c (gfc_match_if): Don't explicitly skip optional whitespace. (gfc_match_nullify): Make sure that ')' is in front of the end of statement. testsuite/ PR fortran/18993 * gfotran.dg/nullify_1.f: New test. From-SVN: r92209 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/match.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'gcc/fortran') diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index b701dc9..e3b2255 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2004-12-15 Tobias Schlueter + + PR fortran/18993 + * match.c (gfc_match_if): Don't explicitly skip optional whitespace. + (gfc_match_nullify): Make sure that ')' is in front of the end of + statement. + 2004-12-14 Richard Henderson * gfortran.h (gfc_expr.function.name): Make const. diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c index cf0c255..825120f 100644 --- a/gcc/fortran/match.c +++ b/gcc/fortran/match.c @@ -974,7 +974,7 @@ gfc_match_if (gfc_statement * if_type) return MATCH_YES; } - if (gfc_match (" then %t") == MATCH_YES) + if (gfc_match (" then%t") == MATCH_YES) { new_st.op = EXEC_IF; new_st.expr = expr; @@ -1822,7 +1822,7 @@ gfc_match_nullify (void) tail->expr = p; tail->expr2 = e; - if (gfc_match_char (')') == MATCH_YES) + if (gfc_match (" )%t") == MATCH_YES) break; if (gfc_match_char (',') != MATCH_YES) goto syntax; -- cgit v1.1