2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
the eh information on the statement.
2007-10-28 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/33589
* g++.dg/torture/pr33589-1.C: New testcase.
* g++.dg/torture/pr33589-2.C: New testcase.
From-SVN: r129700
+2007-10-28 Andrew Pinski <pinskia@gmail.com>
+
+ PR tree-opt/33589
+ * tree-outof-ssa.c (rewrite_trees): If the statement changed, cleanup
+ the eh information on the statement.
+
2007-10-28 Richard Guenther <rguenther@suse.de>
* tree-flow.h (subvar_t): Make it a VEC.
+2007-10-28 Andrew Pinski <pinskia@gmail.com>
+
+ PR tree-opt/33589
+ * g++.dg/torture/pr33589-1.C: New testcase.
+ * g++.dg/torture/pr33589-2.C: New testcase.
+
2007-10-28 Richard Guenther <rguenther@suse.de>
* gcc.dg/tree-ssa/alias-15.c: Adjust pattern.
--- /dev/null
+// { dg-do compile }
+struct base { void somemethod() {} };
+struct derived : public base { };
+
+struct smartpointer
+{
+ ~smartpointer() { }
+ operator derived*() const
+ {
+ return 0;
+ }
+};
+typedef void ( derived::* methodptr_type )();
+methodptr_type getmemberptr()
+{
+ return &derived::somemethod;
+}
+void somefunction()
+{
+ smartpointer pObj;
+ ( pObj->*getmemberptr() )();
+}
--- /dev/null
+// { dg-do compile }
+
+void f(void*) throw();
+
+void somefunction()
+{
+try {
+ void (*g)(void*) = (void (*)(void*))f;
+ void (*g2)(int*) = (void (*)(int*))g;
+ g2(0);
+} catch (...)
+{throw;}
+}
if (remove)
bsi_remove (&si, true);
else
- bsi_next (&si);
+ {
+ if (changed)
+ if (maybe_clean_or_replace_eh_stmt (stmt, stmt))
+ tree_purge_dead_eh_edges (bb);
+ bsi_next (&si);
+ }
}
phi = phi_nodes (bb);