This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] Simplify constants which come from parameter arrays
- From: Dominique d'Humières <dominiq at lps dot ens dot fr>
- To: Thomas König <tk at tkoenig dot net>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2018 17:21:56 +0200
- Subject: Re: [patch, fortran] Simplify constants which come from parameter arrays
- References: <51CF16C7-D140-45B3-A4BC-72FA60FF4E9A@lps.ens.fr> <e7652f09-99ad-0e0e-d2bf-5baedabbae9f@tkoenig.net>
Hi Thomas,
> Le 31 mars 2018 à 13:57, Thomas König <tk@tkoenig.net> a écrit :
>
> Hi Dominique,
>
> These have been resolved now - I have removed the invalid code
> from substr_6.f90 (PR85130), and the error is now suppressed
> in the attached patch.
>
> Re-regression-tested. OK for trunk?
>
> Regards
The new patch regtest fine now. However as said on IRC this looks as a kludge made necessary by a questionable (invalid) test.
IMO it would be more general (better) to call
gfc_simplify_expr (e, 1);
only when there is no pending error (warning?).
I have also a question about "is out of bounds": it is a warning in resolve.c, but an error in expr.c and simplify.c. Should not it be an error everywhere?
Cheers,
Dominique