On 02/12/2021 22:48, Harald Anlauf via Fortran wrote:
Dear Fortranners,

specifying invalid constant array declarations (e.g. real array bounds)
could lead to an ICE because the array specs were checked for consistency.
A possible solution is to try an early simplification before doing that
check and was suggested by Steve.

However, regtesting did reveal that bad declarations involving e.g.
arithmetic errors - like division by zero - were now handled differently.
(The relevant testcase was gfortran.dg/arith_divide_2.f90).

I therefore added a new function gfc_try_simplify_expr that accepts the
simplification only if no error occurs.  This allows discovery of
arithmetic errors also at later stages and will be used here.

Regtested on x86_64-pc-linux-gnu.  OK for mainline?

OK. Thanks

Reply via email to