https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125458

--- Comment #19 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Christopher Albert from comment #18)
> Created attachment 65181 [details]
> 0001-fortran-Preserve-overflow-diagnostics-during-matchin.patch
> 
> Emit range-checked overflow diagnostics immediately outside unsigned mode so
> a successful statement match cannot discard the error while retaining the
> invalid constant. This is narrower than deferring all matching arithmetic.
> A diagnostic test covers multiplication and addition. check-fortran and the
> libgomp Fortran suites are clean.

This looks good in principle (and is below the 15-line limit for AI-assisted
content), but overflow behavior of signed types should not depend
on the setting of -funsigned.

Reply via email to