Fortran: error recovery on arithmetic overflow on unary operations [PR113799]
commitb3d622d70ba209b63471fc1b0970870046e55745
authorHarald Anlauf <anlauf@gmx.de>
Thu, 8 Feb 2024 20:51:38 +0000 (8 21:51 +0100)
committerHarald Anlauf <anlauf@gmx.de>
Fri, 9 Feb 2024 18:24:02 +0000 (9 19:24 +0100)
tree4eb4d5e0249fbf1f1a94f418c8de988c1192850e
parent41a6d2560500a202708e7b661b8b2ad432aee3a6
Fortran: error recovery on arithmetic overflow on unary operations [PR113799]

PR fortran/113799

gcc/fortran/ChangeLog:

* arith.cc (reduce_unary): Remember any overflow encountered during
reduction of unary arithmetic operations on array constructors and
continue, and return error status, but terminate on serious errors.

gcc/testsuite/ChangeLog:

* gfortran.dg/arithmetic_overflow_2.f90: New test.
gcc/fortran/arith.cc
gcc/testsuite/gfortran.dg/arithmetic_overflow_2.f90 [new file with mode: 0644]