https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116519
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- # RANGE [irange] int [-INF, -2][32, +INF] irq.1_1 = (intD.7) irq_5(D); if (irq.1_1 <= 31) The warning is correct here. GCC does not know `[-INF, -2]` is an invalid range for the IRQ. Changing `irq < 32` to be `irq < 32 && irq >= 0` also fixes the issue. Basically is_assignable_irq makes the range `[32, INF]` for unsigned and casting that to signed gets `[-INF, -2], [32, INF]` and then __irq_to_desc checks based on signed 32 so ...