This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]