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: Thomas König <tk at tkoenig dot net>
- To: Dominique d'Humières <dominiq at lps dot ens dot fr>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2018 23:20:12 +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> <6FD16B0D-6267-459E-A839-A49574D9C5FE@lps.ens.fr>
Am 03.04.2018 um 17:21 schrieb Dominique d'Humières:
Hi Dominique,
The new patch regtest fine now. However as said on IRC this looks as a kludge made necessary by a questionable (invalid) test.
What I want to avoid is to have first an error and then a warning
for the same thing. If we say that doesn't matter, I am also fine
with that.
IMO it would be more general (better) to call
gfc_simplify_expr (e, 1);
only when there is no pending error (warning?).
That makes less sense than the current approach. We do not want to
grow the size of an executable because the code has, let's say, a
conversion warning somewhere.
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?
It is inconsistent now. We had this general discussion last year, when
adding the -Wdo-subsript code, and I think we should fix this, but not
in time for gcc 8.
Suggested way forward: Apply the patch as is and open an PR to sort out
the warning/error stuff for out-of-bounds access to be resolved
consistently for gcc-9.
OK?
Regards
Thomas