[Bug middle-end/61010] [4.8/4.9/4.10 Regression] Infinite recursion in fold

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Apr 30 10:18:00 GMT 2014


Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---

          /* If X is a tree of the form (Y * K1) & K2, this might conflict
             with that optimization from the BIT_AND_EXPR optimizations.
             This could end up in an infinite recursion.  */

doesn't trigger because we have an intermediate cast to unsigned (which is
dropped) around the multiplication.

rev. 130635 which introduced that limitation on reducing the number of bits
suggests that we want to apply the same heuristic to the BIT_AND_EXPR
folding.  Jakub, any opinion?

More information about the Gcc-bugs mailing list