[Bug middle-end/125621] ICE in build_poly_int_cst with SVE svcntd () and -fsanitize=undefined

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 9 12:58:04 GMT 2026


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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>:

https://gcc.gnu.org/g:06193eabd2b787bd3815d99b08b1c8b18ca800ea

commit r17-1446-g06193eabd2b787bd3815d99b08b1c8b18ca800ea
Author: Alex Coplan <alex.coplan@arm.com>
Date:   Fri Jun 5 16:51:47 2026 +0100

    expmed: Fix up CONST_POLY_INT case of make_tree [PR125621]

    The PR showed us ICEing in build_poly_int_cst because we have type set
    to a non-type tree node (a var_decl).  A closer look shows this is
    because we pass the wrong variable to wide_int_to_tree in
    expmed.cc:make_tree: we pass t instead of type, where t is
    uninitialized at the point of the call.  Fixed thusly.

    I also took the opportunity to move the CONST_POLY_INT case out of the
    default: section into its own case of the switch.

    gcc/ChangeLog:

            PR middle-end/125621
            * expmed.cc (make_tree): Fix CONST_POLY_INT case to pass type
            instead of t, move it to its own switch case.

    gcc/testsuite/ChangeLog:

            PR middle-end/125621
            * gcc.target/aarch64/torture/pr125621.c: New test.


More information about the Gcc-bugs mailing list