[Bug target/124597] [16 Regression] ICE in verify_flow_info: BB 5 cannot throw but has an EH edge during GIMPLE pass: forwprop since r16-4203

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Mar 22 16:46:19 GMT 2026


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

--- Comment #9 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:968559eb46938ae99f32b673f43df9ab39204535

commit r16-8247-g968559eb46938ae99f32b673f43df9ab39204535
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date:   Sat Mar 21 13:16:17 2026 -0700

    gimple-fold: Fix folding of va_end with maybe throw builtin [PR124597]

    The problem here is when we are replacing the va_end with a GIMPLE_NOP,
    gsi_replace is being called with true for updating the eh information.
    This was a mistake; for most case this worked but with x86 backend
    creating a function decl without nothrow on the VA_END, this caused
    problems of not removing eh edge after removing the call. (The
    x86 backend change is submitted in a different patch).

    Bootstrapped and tested on x86_64-linux-gnu.

            PR tree-optimization/124597

    gcc/ChangeLog:

            * gimple-fold.cc (gimple_fold_builtin_stdarg): Correct the
            eh_update argument to gsi_replace for the VA_END case.

    Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>


More information about the Gcc-bugs mailing list