This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/48846] Many -O2 -flto testsuite failures with -m32 -mavx


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48846

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-03 09:05:58 UTC ---
We have a field-decl with off_align == 255, thus DECL_OFFSET_ALIGN is
technically undefined (computed as 1u << 255).  Things go downhill from there
in at gimplify.c:2051 where we call

              /* Divide the offset by its alignment.  */
              offset = size_binop_loc (loc, EXACT_DIV_EXPR, offset, factor);

with offset and factor == 0 because inn int_const_binop we do

    case ROUND_DIV_EXPR:
      if (double_int_zero_p (op2))
        return NULL_TREE;

and nothing checks for that result.

The bug is in the LTO streamer which packs DECL_OFFSET_ALIGN as a 8 bit
value, assumig it is decl_common.off_align which it is not.

Not sure why this is exposed by the build_int_cst patch.

Well, I have a patch anyway.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]