https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120115
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2025-05-05 Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Keywords| |ice-on-valid-code --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- Confirmed. You can possibly arrive here with --param adjustments as well? The issue is we're using 'unsinged int' for vector lengths and /* Get table of labels to jump to, in order of case index. */ ncases = tree_to_shwi (range) + 1; labelvec.safe_grow_cleared (ncases); get's us a negative ncases (ncases is 'int', but tree_to_shwi produces HOST_WIDE_INT aka int64_t). vec::embedded_size does not handle overflow (aka trip on it): return sizeof (vec_stdlayout) + alloc * sizeof (T); and the issue with disabling switch-conversion is that the switch() expansion then unconditionally is an uncompressed tablejump. When we arrive here, on a 32bit host, the only way out is sorry ().