https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Adding: if (d < 0 || d > a) __builtin_unreachable(); in c makes the warning go away. I think the warning is correct really. as if d is a+1000 it is undefined. Without inlining there is no way to know if d is any value.