http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48674
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-02
14:27:34 UTC ---
Patch:
Index: gcc/cgraph.c
===================================================================
--- gcc/cgraph.c (revision 173249)
+++ gcc/cgraph.c (working copy)
@@ -613,13 +613,15 @@ cgraph_add_thunk (struct cgraph_node *de
node = cgraph_same_body_alias_1 (decl_node, alias, decl);
gcc_assert (node);
gcc_checking_assert (!virtual_offset
- || tree_int_cst_equal (virtual_offset,
- size_int (virtual_value)));
+ || double_int_equal_p
+ (tree_to_double_int (virtual_offset),
+ shwi_to_double_int (virtual_value)));
node->thunk.fixed_offset = fixed_offset;
node->thunk.this_adjusting = this_adjusting;
node->thunk.virtual_value = virtual_value;
node->thunk.virtual_offset_p = virtual_offset != NULL;
node->thunk.alias = real_alias;
+ node->same_body_alias = false;
node->thunk.thunk_p = true;
return node;
}
Index: gcc/cgraphunit.c
===================================================================
--- gcc/cgraphunit.c (revision 173249)
+++ gcc/cgraphunit.c (working copy)
@@ -678,16 +678,6 @@ verify_cgraph_node (struct cgraph_node *
debug_tree (decl);
error_found = true;
}
- else if (decl
- && (n = cgraph_get_node_or_alias (decl))
- && (n->same_body_alias
- && n->thunk.thunk_p))
- {
- error ("a call to thunk improperly represented
"
- "in the call graph:");
- cgraph_debug_gimple_stmt (this_cfun, stmt);
- error_found = true;
- }
}
else if (decl)
{