[PATCH] Fortran: error recovery on arithmetic overflow on unary operations [PR113799]

Harald Anlauf anlauf@gmx.de
Thu Feb 8 21:03:21 GMT 2024


Dear all,

the attached patch improves error recovery when we encounter an
array constructor where a unary operator (e.g. minus) is applied
and -frange-check is active.  The solution is not to terminate
early in that case to avoid inconsistencies between check_result
and reduce_unary when such a situation occurs.

(There might be similar issues for binary operators, not treated
here.)

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

The ICE/memory corruption is actually a 10+ regression.
Do we need a backport?

Thanks,
Harald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr113799.diff
Type: text/x-patch
Size: 2601 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/fortran/attachments/20240208/0294a286/attachment.bin>


More information about the Fortran mailing list