+2004-11-12 Eric Botcazou <ebotcazou@act-europe.fr>
+
+ Backport from mainline:
+ 2004-02-25 Richard Henderson <rth@redhat.com>
+
+ * config/alpha/alpha.c (alpha_emit_conditional_branch): Don't
+ use (op0-op1) == 0 if op0 is a pointer.
+
2004-11-10 Joseph S. Myers <joseph@codesourcery.com>
PR c/18322
/* If the constants doesn't fit into an immediate, but can
be generated by lda/ldah, we adjust the argument and
compare against zero, so we can use beq/bne directly. */
- else if (GET_CODE (op1) == CONST_INT && (code == EQ || code == NE))
+ /* ??? Don't do this when comparing against symbols, otherwise
+ we'll reduce (&x == 0x1234) to (&x-0x1234 == 0), which will
+ be declared false out of hand (at least for non-weak). */
+ else if (GET_CODE (op1) == CONST_INT
+ && (code == EQ || code == NE)
+ && !(symbolic_operand (op0, VOIDmode)
+ || (GET_CODE (op0) == REG && REG_POINTER (op0))))
{
HOST_WIDE_INT v = INTVAL (op1), n = -v;
+2004-11-12 Eric Botcazou <ebotcazou@act-europe.fr>
+
+ * gcc.c-torture/execute/20041112-1.c: New test.
+
2004-11-10 Joseph S. Myers <joseph@codesourcery.com>
PR c/18322