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 c++/112365] [12/13/14 Regression] ICE on invalid C++ since r12-3324
Date: Thu, 16 Nov 2023 16:43:06 +0000	[thread overview]
Message-ID: <bug-112365-4-VYJP9mPEVy@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-112365-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #3 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:0fa32aeaa6da4ef9566d98a6fb541dd7427d7d36

commit r14-5534-g0fa32aeaa6da4ef9566d98a6fb541dd7427d7d36
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Thu Nov 16 17:42:22 2023 +0100

    c++: Fix error recovery ICE [PR112365]

    check_field_decls for DECL_C_BIT_FIELD FIELD_DECLs with error_mark_node
    TREE_TYPE continues early and doesn't call check_bitfield_decl which would
    either set DECL_BIT_FIELD, or clear DECL_C_BIT_FIELD.  So, the following
    testcase ICEs after emitting tons of errors, because
    SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD asserts DECL_BIT_FIELD.

    The patch skips that for FIELD_DECLs with error_mark_node, another
    option would be to check DECL_BIT_FIELD in addition to DECL_C_BIT_FIELD.

    2023-11-16  Jakub Jelinek  <jakub@redhat.com>

            PR c++/112365
            * class.cc (layout_class_type): Don't
            SET_DECL_FIELD_CXX_ZERO_WIDTH_BIT_FIELD on FIELD_DECLs with
            error_mark_node type.

            * g++.dg/cpp0x/pr112365.C: New test.

  parent reply	other threads:[~2023-11-16 16:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  8:15 [Bug c++/112365] New: [14 regression] ICE on invalid C++ sjames at gcc dot gnu.org
2023-11-03  8:33 ` [Bug c++/112365] " rguenth at gcc dot gnu.org
2023-11-03 14:26 ` [Bug c++/112365] " sjames at gcc dot gnu.org
2023-11-03 14:39 ` [Bug c++/112365] [12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-11-16 16:43 ` cvs-commit at gcc dot gnu.org [this message]
2023-11-16 16:44 ` [Bug c++/112365] [12/13/14 Regression] ICE on invalid C++ since r12-3324 jakub 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-112365-4-VYJP9mPEVy@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).