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

--- Comment #10 from CVS 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:bf0a63a1f47525d1c466dbb84616dcb72010affa

commit r11-5490-gbf0a63a1f47525d1c466dbb84616dcb72010affa
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Fri Nov 27 11:23:45 2020 +0100

    gimple-fold: Fix another __builtin_clear_padding ICE

    When playing with __builtin_bit_cast, I have noticed
__builtin_clear_padding
    ICE on the G class below.  The artificial field with D type has offset 0
    and size 8 bytes, but the following artificial field with E type has offset
    0 and size 0, so it triggers the asserts that we don't move current
position
    backwards.  Fixed by ignoring is_empty_type (TREE_TYPE (field)) fields, all
    of their bits are padding which is what is added when skipping over to next
    field anyway.

    2020-11-27  Jakub Jelinek  <ja...@redhat.com>

            PR libstdc++/88101
            * gimple-fold.c (clear_padding_type): Ignore fields with
is_empty_type
            types.

            * g++.dg/torture/builtin-clear-padding-3.C: New test.

Reply via email to