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

Christopher Albert <albert at tugraz dot at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |albert at tugraz dot at,
                   |                            |jvdelisle at gcc dot gnu.org

--- Comment #17 from Christopher Albert <albert at tugraz dot at> ---
Open for review, comments welcome:
https://github.com/lazy-fortran/gcc/pull/43

Root cause: since 57b474bc42dc (the PR84734 error-recovery change),
eval_intrinsic keeps the out-of-range constant for recovery and only
buffers the overflow error. A successful statement match can then
discard the buffered diagnostic while the invalid constant survives,
so the overflow compiles silently. The fix makes eval_intrinsic emit
the range-checked overflow error immediately outside unsigned mode
instead of buffering it, keeping the recovery result without losing
the diagnostic. dg-error test included; check-fortran and the libgomp
Fortran suite are clean.

Reply via email to