+2011-10-12 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/50565
+ * convert.c (convert_to_integer): Do not narrow operands of
+ pointer subtraction.
+
2011-10-12 Nick Clifton <nickc@redhat.com>
* config/arm/arm.h (EMIT_EABI_ATTRIBUTE): New macro. Used to
tree arg0 = get_unwidened (TREE_OPERAND (expr, 0), type);
tree arg1 = get_unwidened (TREE_OPERAND (expr, 1), type);
+ /* Do not try to narrow operands of pointer subtraction;
+ that will interfere with other folding. */
+ if (ex_form == MINUS_EXPR
+ && CONVERT_EXPR_P (arg0)
+ && CONVERT_EXPR_P (arg1)
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (arg0, 0)))
+ && POINTER_TYPE_P (TREE_TYPE (TREE_OPERAND (arg1, 0))))
+ break;
+
if (outprec >= BITS_PER_WORD
|| TRULY_NOOP_TRUNCATION (outprec, inprec)
|| inprec > TYPE_PRECISION (TREE_TYPE (arg0))
+2011-10-12 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/50565
+ * gcc.c-torture/compile/pr50565-1.c,
+ gcc.c-torture/compile/pr50565-2.c: New tests.
+
2011-10-11 Jason Merrill <jason@redhat.com>
PR c++/49855