aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-05-02 15:22:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-05-02 15:22:54 +0000
commite562bf36b644ab3403fc28a5e41bee94fcca1deb (patch)
treeaba2d31b13dea7131e7eb941ca9a452f462c9085 /gcc/cgraph.c
parent6bec6c98971cd984623fcdab094ded3912fb69af (diff)
downloadgcc-e562bf36b644ab3403fc28a5e41bee94fcca1deb.zip
gcc-e562bf36b644ab3403fc28a5e41bee94fcca1deb.tar.gz
gcc-e562bf36b644ab3403fc28a5e41bee94fcca1deb.tar.bz2
varasm.c (output_constructor_regular_field): Compute zero-based index with double-ints.
2011-05-02 Richard Guenther <rguenther@suse.de> * varasm.c (output_constructor_regular_field): Compute zero-based index with double-ints. Make sure to ICE instead of producing wrong code. * cgraph.c (cgraph_add_thunk): Do not create new tree nodes in asserts. Properly use a signed type. From-SVN: r173255
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 2086bfe..91805e3 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -613,8 +613,9 @@ cgraph_add_thunk (struct cgraph_node *decl_node, tree alias, tree decl,
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;