https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81194
Peter Bergner <bergner at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |bergner at gcc dot gnu.org --- Comment #8 from Peter Bergner <bergner at gcc dot gnu.org> --- So we have a switch statement with onc case and a default case statement. The normal case statement contains an __builtin_unreachable() call, so we delete the case statement, leaving us with only the default case. We then call into expand_case() and we have this code which has been there for a while: /* Get upper and lower bounds of case values. */ elt = gimple_switch_label (stmt, 1); Since there is only one default case statement in stmt, asking for the label at offset "1" is illegal and that leads to the ICE. Either we need to protect this code or maybe we can remove the switch statement all together.