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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>:

https://gcc.gnu.org/g:3e8323e873c5af5047507d6b2cfbd12706820ee2

commit r14-9502-g3e8323e873c5af5047507d6b2cfbd12706820ee2
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Sat Mar 16 15:15:29 2024 +0100

    bitint: Fix up stores to large/huge _BitInt bitfields [PR114329]

    The verifier requires BIT_FIELD_REFs with INTEGRAL_TYPE_P first operand
    to have mode precision.  In most cases for the large/huge _BitInt bitfield
    stores the code uses bitfield representatives, which are typically arrays
    of chars, but if the bitfield starts at byte boundary on big endian,
    the code uses as nlhs in lower_mergeable_store COMPONENT_REF of the
    bitfield FIELD_DECL instead, which is fine for the limb accesses,
    but when used for the most significant limb can result in invalid
    BIT_FIELD_REF because the first operand then has BITINT_TYPE and
    usually VOIDmode.

    The following patch adds a helper method for the 4 creatikons of
    BIT_FIELD_REF which when needed adds a VIEW_CONVERT_EXPR.

    2024-03-16  Jakub Jelinek  <ja...@redhat.com>

            PR tree-optimization/114329
            * gimple-lower-bitint.cc (struct bitint_large_huge): Declare
            build_bit_field_ref method.
            (bitint_large_huge::build_bit_field_ref): New method.
            (bitint_large_huge::lower_mergeable_stmt): Use it.

            * gcc.dg/bitint-101.c: New test.

Reply via email to