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

--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <[email protected]>:

https://gcc.gnu.org/g:b55277a4f8543f52c6d1664bb05e8eb90f46aaf3

commit r16-3563-gb55277a4f8543f52c6d1664bb05e8eb90f46aaf3
Author: Jakub Jelinek <[email protected]>
Date:   Thu Sep 4 10:45:17 2025 +0200

    bitint: Fix torture/bitint-14.c on bitint_extended targets [PR117599]

    This patch fixes regressions of the gcc.dg/torture/bitint-* tests
    caused by r16-3036-ga76a032354ee48 with --enable-checking=all.

    The errors are similar to the following:

    ../../gcc/testsuite/gcc.dg/torture/bitint-14.c:54:1: error: type mismatch
in 'array_ref'
    <unnamed-signed:63>

    unsigned long

    _42 = VIEW_CONVERT_EXPR<unsigned long[10]>(r575[i_10])[8];
    during GIMPLE pass: bitintlower0
    ../../gcc/testsuite/gcc.dg/torture/bitint-14.c:54:1: internal compiler
error: verify_gimple failed

    The first two hunks aren't strictly necessary, I'm just trying to
    avoid calling build_qualified_type when it won't be needed.

    At least on s390x-linux (tried cross) bitint-14.c doesn't ICE with it
    anymore.

    Though, I must say the more I look at the limb_access changes, the less
    I like the abi_load_p stuff, so I think what we eventually should do
instead
    is return values with m_limb_type always.
    For bitint_extended case (but only if we can prove that the extension there
    is for the right precision and right sign) or !write_p just return it,
    otherwise cast to lower precision and back to m_limb_type.
    And on the other side on stores, for !bitint_extended happily store
whatever
    the whole m_limb_type value contains, for bitint_extended do the cast to
    smaller precision and back on the writes.

    2025-09-04  Jakub Jelinek  <[email protected]>

            PR target/117599
            * gimple-lower-bitint.cc (bitint_large_huge::limb_access): Move
            build_qualified_type calls into the if/else if/else bodies, for
            the last one set ltype to m_limb_type first, drop limb_type_a
            and use ltype instead.

Reply via email to