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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Christopher Bazley <[email protected]>:

https://gcc.gnu.org/g:8982c7122aeb377f4015096623520b90188ae347

commit r17-6213-g8982c7122aeb377f4015096623520b90188ae347
Author: Christopher Bazley <[email protected]>
Date:   Wed Nov 11 16:15:16 2026 +0000

    c: Fix ICE in GIMPLE parser caused by VLA-type _Literal [PR128606]

    When parsing a _Literal expression, c_parser_gimple_postfix_expression
    previously called TYPE_VECTOR_SUBPARTS (type).to_constant () to
    determine the number of elements for which to allocate space in a
    vector.  That did not work for vectors of vector-length agnostic
    type, such as the svuint8_t type defined by <arm_sve.h>.

    gcc/c/ChangeLog:

            PR c/128606
            * gimple-parser.cc (c_parser_gimple_postfix_expression):
            Substitute a call to constant_lower_bound () in place of
            to_constant ().

    gcc/testsuite/ChangeLog:

            PR c/128606
            * gcc.target/aarch64/sve/pr128606_1.c,
            gcc.target/aarch64/sve/pr128606_10.c,
            gcc.target/aarch64/sve/pr128606_11.c,
            gcc.target/aarch64/sve/pr128606_2.c,
            gcc.target/aarch64/sve/pr128606_3.c,
            gcc.target/aarch64/sve/pr128606_4.c,
            gcc.target/aarch64/sve/pr128606_5.c,
            gcc.target/aarch64/sve/pr128606_6.c,
            gcc.target/aarch64/sve/pr128606_7.c,
            gcc.target/aarch64/sve/pr128606_8.c,
            gcc.target/aarch64/sve/pr128606_9.c: New tests.
            * gcc.target/aarch64/sve/pr128606_primes.h: Shared test code.

Reply via email to