[Bug middle-end/52134] Does not fold (x * 4) & -4
ebotcazou at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Feb 6 14:08:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52134
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-02-06
Ever Confirmed|0 |1
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-02-06 14:08:13 UTC ---
> The above expression computes non-constant
>
> ((ssizetype) (((sizetype) MAX_EXPR <R1b, 0> + 2) * 4) & -4) - (ssizetype)
> ((sizetype) MAX_EXPR <R1b, 0> * 4)
>
> Not sure if such an expression cannot be reliably required to be constant
> in ada though.
Reassociation/simplification of size expressions can generally be done at will.
> Certainly this looks like a missed folding (not sure how often this
> odd BIT_AND_EXPR for sizes happen in Ada).
Quite a lot, but it's created by the folder itself (round_up).
More information about the Gcc-bugs
mailing list