[patch, fortran] PR34325 Wrong error message for syntax error
Jerry DeLisle
jvdelisle@verizon.net
Mon May 5 00:28:00 GMT 2008
This patch provides some additional checks for balanced parenthesis in a couple
of strategic locations. This will not catch all the possibilities, but is a
reasonable enhancement.
I noticed in some cases of double parens for array references such as:
r3((2,2)) = 4.3
gfortran correctly finds the error stating that the index must be integer. It
was not real clear that in the above (2,2) is a COMPLEX. Ifort and Sun F95 both
add additional info that a COMPLEX was found. I supplemented the gfortran error
to do similarly.
Regression tested on x86-64. Revised test case included in patch.
OK for trunk?
Regards,
Jerry
2008-05-04 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34325.diff
Type: text/x-patch
Size: 3516 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080505/2bfa7499/attachment.bin>
More information about the Fortran
mailing list