[Bug c++/98043] [8/9/10/11 Regression] ICE ‘verify_gimple’ failed since r5-3726-g083e891e69429f93b958f6c18e2d52f515bae572
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 1 23:44:29 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98043
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |8.5
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Candidate fix:
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3711,6 +3711,10 @@ pop_switch (void)
SWITCH_STMT_ALL_CASES_P (cs->switch_stmt) = 1;
if (!cs->break_stmt_seen_p)
SWITCH_STMT_NO_BREAK_P (cs->switch_stmt) = 1;
+ if (SWITCH_STMT_TYPE (cs->switch_stmt)
+ && SCOPED_ENUM_P (SWITCH_STMT_TYPE (cs->switch_stmt)))
+ SWITCH_STMT_TYPE (cs->switch_stmt)
+ = TREE_TYPE (SWITCH_STMT_COND (cs->switch_stmt));
gcc_assert (!cs->in_loop_body_p);
splay_tree_delete (cs->cases);
switch_stack = switch_stack->next;
More information about the Gcc-bugs
mailing list