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

--- 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:194ab79b580b69554124cf8257b19c957690a8a8

commit r14-8806-g194ab79b580b69554124cf8257b19c957690a8a8
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Mon Feb 5 18:53:59 2024 +0100

    c: Avoid ICE with _BitInt(N) : 0 bitfield [PR113740]

    finish_struct already made sure not to call build_bitint_type for
    signed _BitInt(2) : 1;
    or
    signed _BitInt(2) : 0;
    bitfields (but instead build a zero precision integral type,
    we remove it later), this patch makes sure we do it also for
    unsigned _BitInt(1) : 0;
    because of the build_bitint_type assertion that precision is
    >= (unsigned ? 1 : 2).

    2024-02-05  Jakub Jelinek  <ja...@redhat.com>

            PR c/113740
            * c-decl.cc (finish_struct): Only use build_bitint_type if
            bit-field has width larger or equal to minimum _BitInt
            precision.

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

Reply via email to