re PR ipa/64988 (ICE: verify_cgraph_node failed: Alias and target's comdat groups...
authorJan Hubicka <hubicka@ucw.cz>
Mon, 2 Mar 2015 20:10:56 +0000 (21:10 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 2 Mar 2015 20:10:56 +0000 (20:10 +0000)
PR ipa/64988
* ipa-inline-transform.c (clone_inlined_nodes): Do not dissolve
comdat groups.
* g++.dg/torture/pr64988.C: New testcase.

From-SVN: r221123

gcc/ChangeLog
gcc/ipa-inline-transform.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr64988.C [new file with mode: 0644]

index da14db851574a406a25c7534e6bc16c1d243dade..f84b46281da02eebcfbc07a1e221053fac972e19 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-02  Jan Hubicka   <hubicka@ucw.cz>
+
+       PR ipa/64988
+       * ipa-inline-transform.c (clone_inlined_nodes): Do not dissolve
+       comdat groups.
+
 2015-03-02  Jan Hubicka  <hubicka@ucw.cz>
            Aldy Hernandez  <aldyh@redhat.com>
 
index 52493cc4d0017f782a7ce24913e0d80a5b973b38..38a98dbe43cbb5d081ef20deab7ba902e9f34de3 100644 (file)
@@ -213,7 +213,7 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
             For now we keep the ohter functions in the group in program until
             cgraph_remove_unreachable_functions gets rid of them.  */
          gcc_assert (!e->callee->global.inlined_to);
-         e->callee->dissolve_same_comdat_group_list ();
+         e->callee->remove_from_same_comdat_group ();
          if (e->callee->definition
              && inline_account_function_p (e->callee))
            {
@@ -243,7 +243,7 @@ clone_inlined_nodes (struct cgraph_edge *e, bool duplicate,
        }
     }
   else
-    e->callee->dissolve_same_comdat_group_list ();
+    e->callee->remove_from_same_comdat_group ();
 
   e->callee->global.inlined_to = inlining_into;
 
index 9c4b587f6f0c71a136269d5722da1a879df54850..135f73498b4f17443ee39247c9e22a77c6db7f94 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-02  Jan Hubicka   <hubicka@ucw.cz>
+
+       PR ipa/64988
+       * g++.dg/torture/pr64988.C: New testcase.
+
 2015-03-02  Tobias Burnus  <burnus@net-b.de>
 
        * gfortran.dg/coarray_atomic_6.f90: New.
diff --git a/gcc/testsuite/g++.dg/torture/pr64988.C b/gcc/testsuite/g++.dg/torture/pr64988.C
new file mode 100644 (file)
index 0000000..b9cf0e0
--- /dev/null
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// { dg-options "-O -fdeclone-ctor-dtor" }
+struct A {
+  virtual ~ A ();
+};
+
+struct B : virtual A {};
+struct C : virtual A {};
+
+struct D : B, C {};
+
+D d;