https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114084
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-02-24 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed, here is a testcase which should be generic for even 16bit int targets. ``` typedef unsigned _BitInt(sizeof(int)*8-1) ub63; ub63 ub63_0, ub63_1; void foo (void) { ub63_1 = (ub63) ((ub63_0 | (-1u>>1) ) >> 1 | (ub63_0 | 5) << 4); } ``` Note I tried to reproduce this using bitfields but that works. Also note the cast is important here ...