This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Fix IPA thunk handling (PR lto/60567)


Hi!

Honza has acked this patch on IRC, so I've committed it to trunk after
bootstrap/regtest on x86_64-linux and i686-linux.

2014-04-10  Jan Hubicka  <hubicka@ucw.cz>
	    Jakub Jelinek  <jakub@redhat.com>

	PR lto/60567
	* ipa.c (function_and_variable_visibility): Copy forced_by_abi flag from
	decl_node to node.

	* g++.dg/lto/pr60567_0.C: New test.

--- gcc/ipa.c.jj	2014-04-10 12:17:06.000000000 +0200
+++ gcc/ipa.c	2014-04-10 16:27:41.546991476 +0200
@@ -1032,6 +1032,7 @@ function_and_variable_visibility (bool w
 				   == DECL_COMDAT_GROUP (decl_node->decl));
 	      gcc_checking_assert (node->same_comdat_group);
 	    }
+	  node->forced_by_abi = decl_node->forced_by_abi;
 	  if (DECL_EXTERNAL (decl_node->decl))
 	    DECL_EXTERNAL (node->decl) = 1;
 	}
--- gcc/testsuite/g++.dg/lto/pr60567_0.C.jj	2014-04-10 12:04:07.227797680 +0200
+++ gcc/testsuite/g++.dg/lto/pr60567_0.C	2014-04-10 12:06:18.063099605 +0200
@@ -0,0 +1,23 @@
+// PR lto/60567
+// { dg-lto-do link }
+// { dg-lto-options { { -flto -fno-use-linker-plugin } } }
+// { dg-extra-ld-options "-r -nostdlib" }
+
+#pragma implementation
+struct S {};
+
+#pragma interface
+struct T
+{
+  virtual void foo (const S &) = 0;
+};
+
+struct U
+{
+  virtual void bar (const S &) = 0;
+};
+
+struct V : public T, public U
+{
+  virtual void bar (const S &) {}
+};

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]