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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-26 
11:27:10 UTC ---
The problem is that first build_binary_op wraps 1 / 0 into C_MAYBE_CONST_EXPR,
              if (!in_late_binary_op)
                {
                  if (!op0_maybe_const || TREE_CODE (op0) != INTEGER_CST)
                    op0 = c_wrap_maybe_const (op0, !op0_maybe_const);
                  if (!op1_maybe_const || TREE_CODE (op1) != INTEGER_CST)
                    op1 = c_wrap_maybe_const (op1, !op1_maybe_const);
                }
and later on the whole GT_EXPR with C_MAYBE_CONST_EXPR op0 and INTEGER_CST op1
is wrapped in yet another C_MAYBE_CONST_EXPR:
  else if (TREE_CODE (ret) != INTEGER_CST && int_operands
           && !in_late_binary_op)
    ret = note_integer_operands (ret);
Apparently, c_fully_fold_internal doesn't handle nested C_MAYBE_CONST_EXPRs
though, if it finds one, it doesn't recurse on the content and just returns it.

Joseph?

Reply via email to