PR middle-end/11767
* optabs.c (prepare_cmp_insn): Force trapping memories to registers
before the compare, if flag_non_call_exceptions.
* g++.dg/other/profile1.C: New.
From-SVN: r78808
+2004-03-02 Richard Henderson <rth@redhat.com>
+
+ PR middle-end/11767
+ * optabs.c (prepare_cmp_insn): Force trapping memories to registers
+ before the compare, if flag_non_call_exceptions.
+
2004-03-02 Richard Henderson <rth@redhat.com>
PR middle-end/14327
return;
}
+ /* Don't allow operands to the compare to trap, as that can put the
+ compare and branch in different basic blocks. */
+ if (flag_non_call_exceptions)
+ {
+ if (may_trap_p (x))
+ x = force_reg (mode, x);
+ if (may_trap_p (y))
+ y = force_reg (mode, y);
+ }
+
*px = x;
*py = y;
if (can_compare_p (*pcomparison, mode, purpose))