Isn't it the case that *any* conversion can be stripped for the purpose
of this routine?  I get an ICE compiling the Ada RTS a-strfix.adb because
of that.  The following seems to fix it, but is it right?

*** tree-ssa-loop-ivopts.c      26 Jun 2005 21:21:32 -0000      2.82
--- tree-ssa-loop-ivopts.c      29 Jun 2005 21:38:29 -0000
*************** constant_multiple_of (tree type, tree to
*** 2594,2599 ****
    bool negate;
  
!   STRIP_NOPS (top);
!   STRIP_NOPS (bot);
  
    if (operand_equal_p (top, bot, 0))
--- 2594,2603 ----
    bool negate;
  
!   /* For determining the condition above, we can ignore all conversions, not
!      just those that don't change the mode, so can't use STRIP_NOPS here. */
!   while (TREE_CODE (top) == NOP_EXPR || TREE_CODE (top) == CONVERT_EXPR)
!     top = TREE_OPERAND (top, 0);
!   while (TREE_CODE (bot) == NOP_EXPR || TREE_CODE (bot) == CONVERT_EXPR)
!     bot = TREE_OPERAND (bot, 0);
  
    if (operand_equal_p (top, bot, 0))

Reply via email to