https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97317
--- Comment #2 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- operator_cast::op1_range() is creating a range with swapped operands here: // And union this with the entire outer types negative range. int_range_max neg (type, wi::min_value (TYPE_PRECISION (type), SIGNED), lim - 1); (gdb) ptg type <unnamed-unsigned:17> (gdb) dd wmin [0xffffffffffff0000], precision = 17 (gdb) dd wmax [0xffff], precision = 17 This is an unsigned bit field, which I can never get right. Andrew, should we be creating a min in SIGNED precision here?