aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/decl.c
diff options
context:
space:
mode:
authorJerry DeLisle <jvdelisle@gcc.gnu.org>2008-05-16 16:44:28 +0000
committerJerry DeLisle <jvdelisle@gcc.gnu.org>2008-05-16 16:44:28 +0000
commitacb388a0cb8503c7ee94a74c725903e539a19115 (patch)
tree6527e06cef13e036e6dae35e43a6daa568e57d2f /gcc/fortran/decl.c
parentd1325932580a13fea6ce6e257c30e756405d5ac3 (diff)
downloadgcc-acb388a0cb8503c7ee94a74c725903e539a19115.zip
gcc-acb388a0cb8503c7ee94a74c725903e539a19115.tar.gz
gcc-acb388a0cb8503c7ee94a74c725903e539a19115.tar.bz2
re PR fortran/34325 (Wrong error message for syntax error)
2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org> 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
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r--gcc/fortran/decl.c7
1 files changed, 7 insertions, 0 deletions
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;