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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
We crash because now the C FE uses a SWITCH_STMT in the else branch:

2766   /* Compute the hash of the else branch.  */
2767   inchash::hash hstate1 (0);
2768   inchash::add_expr (elseb, hstate1);
2769   hashval_t h1 = hstate1.end ();

but the fold-const.c routines don't know how to handle such a code.  This is
not a problem in the C++ FE because by the time we get to
do_warn_duplicated_branches we've already cp_genericize'd the SWITCH_STMT tree
into a SWITCH_EXPR.

Reply via email to