https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99062
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- There already is a test in the attribute handler to validate the alignment: it calls integer_pow2p (val). Val here is: <integer_cst 0x7fffea7f7ed0 type <integer_type 0x7fffea8105e8 int> constant -2147483648> but integer_pow2p (val) returns true. I'd expect the function to return false since INT_MIN is not a power of two. Anyway, the test integer_pow2p (val) should probably be changed to tree_int_cst_sgn (val) < 0 || integer_pow2p (val). Separately, the warning should be enhanced to understand that [x, y) is a half-open range and not complain; then the code can go back to the original [0, %E) without any additional checking.