This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR43851 match_stopcode cleanup
- From: Tobias Burnus <burnus at net-b dot de>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 23 May 2010 00:05:37 +0200
- Subject: Re: [patch, fortran] PR43851 match_stopcode cleanup
- References: <4BF81C7F.8090209@verizon.net>
Jerry DeLisle worte:
> Attached patch is self explanatory and adds some checks and does some
> clean up. I have not found an easy way to check for parameters.
Me neither - already "gfc_match_expr" does "too much" simplification.
> One thing we could do is put all the new stuff behind f2008 and
> restore the older matching of digits with F95. I am not sure it gains
> much to do so though.
I think this is not needed.
> Regression tested on x86-64.
> OK for trunk?
OK and thanks for the patch. However, I think the check
+ if (!gfc_is_constant_expr(e))
is unreachable as
+ m = gfc_match_init_expr (&e);
should already take case of this. Can you construct an example, where
"!gfc_is_constant_expr(e)" is true and thus your error is printed?
Tobias
> 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR fortran/43851
> * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to
> cleanup
> before returning MATCH_ERROR. Add check for scalar. Add check for
> default integer kind. Use gfc_is_constant_expr.