public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "blubban at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103825] New: [12 Regression] ICE on switch on enum class in bitfield Date: Sat, 25 Dec 2021 00:26:23 +0000 [thread overview] Message-ID: <bug-103825-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103825 Bug ID: 103825 Summary: [12 Regression] ICE on switch on enum class in bitfield Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blubban at gmail dot com Target Milestone: --- enum class Type { Pawn }; struct Piece { Type type : 4; }; void foo() { switch (Piece().type) case Type::Pawn:; } The above causes an ICE on GCC 12.0.0 20211222, no compile flags needed. It compiles without warnings on GCC 11, Clang, and MSVC. Compiler Explorer: https://godbolt.org/z/GdG6ovEzz <source>: In function 'void foo()': <source>:5:6: error: type precision mismatch in switch statement 5 | void foo() { | ^~~ switch (retval.0) <default: <D.2160>, case 0: <D.2157>> <source>:5:6: internal compiler error: 'verify_gimple' failed 0x2115089 internal_error(char const*, ...) ???:0 0x11603ed verify_gimple_in_seq(gimple*) ???:0 0xdda0d1 gimplify_body(tree_node*, bool) ???:0 0xdda397 gimplify_function_tree(tree_node*) ???:0 0xbe6a57 cgraph_node::analyze() ???:0 0xbeaf6d symbol_table::finalize_compilation_unit() ???:0 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
next reply other threads:[~2021-12-25 0:26 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-12-25 0:26 blubban at gmail dot com [this message] 2021-12-25 0:56 ` [Bug c++/103825] " pinskia at gcc dot gnu.org 2024-03-24 22:55 ` pinskia at gcc dot gnu.org 2024-03-26 15:48 ` mpolacek at gcc dot gnu.org 2024-04-02 18:19 ` cvs-commit at gcc dot gnu.org 2024-04-02 18:26 ` cvs-commit at gcc dot gnu.org 2024-04-02 18:27 ` mpolacek 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-103825-4@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: linkBe 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).