From acb388a0cb8503c7ee94a74c725903e539a19115 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Fri, 16 May 2008 16:44:28 +0000 Subject: re PR fortran/34325 (Wrong error message for syntax error) 2008-05-16 Jerry DeLisle PR fortran/34325 * decl.c (match_attr_spec): Check for matching pairs of parenthesis. * expr.c (gfc_specification_expr): Supplement the error message with the type that was found. * resolve.c (gfc_resolve_index): Likewise. * match.c (gfc_match_parens): Clarify error message with "at or before". (gfc_match_do): Check for matching pairs of parenthesis. From-SVN: r135428 --- gcc/fortran/decl.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/fortran/decl.c') diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 24606c4..5a1ce03 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2934,6 +2934,13 @@ match_attr_spec (void) goto cleanup; } + /* Check to make sure any parens are paired up correctly. */ + if (gfc_match_parens () == MATCH_ERROR) + { + m = MATCH_ERROR; + goto cleanup; + } + seen[d]++; seen_at[d] = gfc_current_locus; -- cgit v1.1