+2004-11-25 Ricahrd Henderson <rth@redhat.com>
+
+ PR c++/6764
+ * reload1.c (set_initial_eh_label_offset): New.
+ (set_initial_label_offsets): Use it.
+
2004-11-25 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.c (sh_output_mi_thunk): Initialize bitmap obstacks
num_not_at_initial_offset = 0;
}
+/* Subroutine of set_initial_label_offsets called via for_each_eh_label. */
+
+static void
+set_initial_eh_label_offset (rtx label)
+{
+ set_label_offsets (label, NULL_RTX, 1);
+}
+
/* Initialize the known label offsets.
Set a known offset for each forced label to be at the initial offset
of each elimination. We do this because we assume that all
for (x = forced_labels; x; x = XEXP (x, 1))
if (XEXP (x, 0))
set_label_offsets (XEXP (x, 0), NULL_RTX, 1);
+
+ for_each_eh_label (set_initial_eh_label_offset);
}
/* Set all elimination offsets to the known values for the code label given
--- /dev/null
+// PR 6764
+// { dg-do run }
+// { dg-options "-O -fomit-frame-pointer" }
+
+extern "C" void abort ();
+
+class test
+{
+ public:
+ test * const me;
+ test () : me(this) { }
+ ~test () { if (me != this) abort (); }
+};
+
+void x1 ()
+{
+ test w1;
+ throw 1;
+}
+
+void x2 ()
+{
+ test w2;
+ x1 ();
+}
+
+int main (void)
+{
+ try {
+ x2 ();
+ } catch (...) {
+ }
+ return 0;
+}