public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/109868] [13/14 regression] ICE: segmentation fault or ICE in min_value with zero sized bitfield
Date: Wed, 17 May 2023 08:16:45 +0000	[thread overview]
Message-ID: <bug-109868-4-NxFUJDvaOR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-109868-4@http.gcc.gnu.org/bugzilla/>

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

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

https://gcc.gnu.org/g:78327cf06e6b65fc9c614622c98f6a3f3bfb7784

commit r14-927-g78327cf06e6b65fc9c614622c98f6a3f3bfb7784
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed May 17 10:15:50 2023 +0200

    c++: Don't try to initialize zero width bitfields in zero initialization
[PR109868]

    My GCC 12 change to avoid removing zero-sized bitfields as they are
    important for ABI and are needed for layout compatibility traits
    apparently causes zero sized bitfields to be initialized in the IL,
    which at least in 13+ results in ICEs in the ranger which is upset
    about zero precision types.

    I think we could even avoid initializing other unnamed bitfields, but
    unfortunately !CONSTRUCTOR_NO_CLEARING doesn't mean in the middle-end
    clearing of padding bits and until we have some new flag that represents
    the request to clear padding bits, I think it is better to keep zeroing
    non-zero sized unnamed bitfields.

    In addition to skipping those fields, I have changed the logic how
    UNION_TYPEs are handled, the current code was a little bit weird in that
    e.g. if first non-static data member had error_mark_node type, we'd happily
    zero initialize the second non-static data member, etc.

    2023-05-17  Jakub Jelinek  <jakub@redhat.com>

            PR c++/109868
            * init.cc (build_zero_init_1): Don't initialize zero-width
bitfields.
            For unions only initialize the first FIELD_DECL.

            * g++.dg/init/pr109868.C: New test.

  parent reply	other threads:[~2023-05-17  8:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 22:37 [Bug c++/109868] New: [13/14 regression] ICE: segmentation fault when building small C++ program sjames at gcc dot gnu.org
2023-05-15 22:40 ` [Bug c++/109868] " sjames at gcc dot gnu.org
2023-05-15 22:40 ` sjames at gcc dot gnu.org
2023-05-15 22:43 ` [Bug tree-optimization/109868] [13/14 regression] ICE: segmentation fault or ICE in min_value with zero sized bitfield pinskia at gcc dot gnu.org
2023-05-15 22:45 ` pinskia at gcc dot gnu.org
2023-05-15 22:52 ` pinskia at gcc dot gnu.org
2023-05-15 22:53 ` pinskia at gcc dot gnu.org
2023-05-15 22:55 ` jakub at gcc dot gnu.org
2023-05-15 23:02 ` pinskia at gcc dot gnu.org
2023-05-15 23:02 ` jakub at gcc dot gnu.org
2023-05-15 23:06 ` sjames at gcc dot gnu.org
2023-05-16  0:13 ` pinskia at gcc dot gnu.org
2023-05-16  0:15 ` pinskia at gcc dot gnu.org
2023-05-16  4:25 ` sjames at gcc dot gnu.org
2023-05-16  8:13 ` jakub at gcc dot gnu.org
2023-05-16 15:47 ` pinskia at gcc dot gnu.org
2023-05-17  6:57 ` rguenth at gcc dot gnu.org
2023-05-17  8:16 ` cvs-commit at gcc dot gnu.org [this message]
2023-05-17 19:27 ` cvs-commit at gcc dot gnu.org
2023-05-17 19:28 ` jakub at gcc dot gnu.org
2023-05-17 19:32 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-109868-4-NxFUJDvaOR@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).