This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49378] [4.7 Regression] C++ is broken
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 12 Jun 2011 14:42:00 +0000
- Subject: [Bug middle-end/49378] [4.7 Regression] C++ is broken
- Auto-submitted: auto-generated
- References: <bug-49378-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49378
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-06-12 14:41:18 UTC ---
Hi,
looks like I have the lucky kernel.
I think the problem is that we now mark as local thunks that are not having
address taken that makes i386 BE to use register passing conventions.
Does the following patch help?
Index: ipa.c
===================================================================
--- ipa.c (revision 174958)
+++ ipa.c (working copy)
@@ -120,6 +120,7 @@ static bool
cgraph_non_local_node_p_1 (struct cgraph_node *node, void *data
ATTRIBUTE_UNUSED)
{
return !(cgraph_only_called_directly_or_aliased_p (node)
+ && !ipa_ref_has_aliases_p (&node->ref_list)
&& node->analyzed
&& !DECL_EXTERNAL (node->decl)
&& !node->local.externally_visible
@@ -132,7 +133,11 @@ cgraph_non_local_node_p_1 (struct cgraph
static bool
cgraph_local_node_p (struct cgraph_node *node)
{
- return !cgraph_for_node_and_aliases (cgraph_function_or_thunk_node (node,
NULL),
+ struct cgraph_node *n = cgraph_function_or_thunk_node (node, NULL);
+
+ if (n->thunk.thunk_p)
+ return false;
+ return !cgraph_for_node_and_aliases (n,
cgraph_non_local_node_p_1, NULL, true);
}