]> gcc.gnu.org Git - gcc.git/commitdiff
PR tree-optimization/r55789
authorJan Hubicka <jh@suse.cz>
Tue, 5 Feb 2013 09:11:53 +0000 (10:11 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 5 Feb 2013 09:11:53 +0000 (09:11 +0000)
* cgraphclones.c (cgraph_remove_node_and_inline_clones): Remove
the dead call anyway.

* g++.dg/torture/pr55789.C: New testcase.

From-SVN: r195750

gcc/ChangeLog
gcc/cgraphclones.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr55789.C [new file with mode: 0644]

index 5af0cea01af03fd2edc10a78ad7f66febbf830ae..59eaf4862563bdd7019f005684afc473126cbbee 100644 (file)
@@ -1,3 +1,9 @@
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+       PR tree-optimization/r55789
+       * cgraphclones.c (cgraph_remove_node_and_inline_clones): Remove
+       the dead call anyway.
+
 2013-02-05  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR sanitizer/55374
index 30d02d11dd92fc9ff8227a751668929f13bce778..3a2e3d679e2153247729a2a2b62a828cc67e090c 100644 (file)
@@ -570,7 +570,10 @@ cgraph_remove_node_and_inline_clones (struct cgraph_node *node, struct cgraph_no
   bool found = false;
 
   if (node == forbidden_node)
-    return true;
+    {
+      cgraph_remove_edge (node->callers);
+      return true;
+    }
   for (e = node->callees; e; e = next)
     {
       next = e->next_callee;
index ab73fbf6b08d329862925e779376f89dd86052c6..58f1643314b1c3d1af09e13c8d668c470d3a5ff4 100644 (file)
@@ -1,3 +1,8 @@
+2013-02-05  Jan Hubicka  <jh@suse.cz>
+
+       PR tree-optimization/r55789
+       * g++.dg/torture/pr55789.C: New testcase.
+
 2013-02-05  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/56167
diff --git a/gcc/testsuite/g++.dg/torture/pr55789.C b/gcc/testsuite/g++.dg/torture/pr55789.C
new file mode 100644 (file)
index 0000000..a5a31a4
--- /dev/null
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-guess-branch-probability  -fno-tree-forwprop --param max-early-inliner-iterations=10 --param=early-inlining-insns=176" } */
+
+template < typename T > struct intrusive_ptr
+{
+  ~intrusive_ptr ()
+  {
+    delete px;
+  }
+  T *px;
+};
+
+struct section_info
+{
+  intrusive_ptr < section_info > parent;
+};
+
+struct file_info
+{
+  intrusive_ptr < file_info > parent;
+  intrusive_ptr < section_info > switched_section;
+};
+
+
+void
+start_file (void)
+{
+  intrusive_ptr < file_info > parent;
+}
+
This page took 0.082737 seconds and 5 git commands to generate.