aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/gimple-fold.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc
index 86b8347..fd01810 100644
--- a/gcc/gimple-fold.cc
+++ b/gcc/gimple-fold.cc
@@ -8159,8 +8159,8 @@ fold_ctor_reference (tree type, tree ctor, const poly_uint64 &poly_offset,
result. */
if (!AGGREGATE_TYPE_P (TREE_TYPE (ctor)) && !offset
/* VIEW_CONVERT_EXPR is defined only for matching sizes. */
- && !compare_tree_int (TYPE_SIZE (type), size)
- && !compare_tree_int (TYPE_SIZE (TREE_TYPE (ctor)), size))
+ && known_eq (wi::to_poly_widest (TYPE_SIZE (type)), size)
+ && known_eq (wi::to_poly_widest (TYPE_SIZE (TREE_TYPE (ctor))), size))
{
ret = canonicalize_constructor_val (unshare_expr (ctor), from_decl);
if (ret)