https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99062

--- Comment #5 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #4)
> 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).

About to post a patch that hoists the tree_int_cst_sgn check so that we don't
have to repeat it.

Reply via email to