[patch, fortran] Simplify constants which come from parameter arrays

Dominique d'Humières dominiq@lps.ens.fr
Tue Apr 3 15:22:00 GMT 2018


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


More information about the Gcc-patches mailing list