diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-10-21 20:00:30 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-10-21 18:00:30 +0000 |
commit | b6d3c0311a633503f63884eb8eec3679256ace2c (patch) | |
tree | 2bfe7b1e099bea665cddc4e5183b26a96c308ecc /gcc/gimple-expr.c | |
parent | e9122ef60858058cb474b3d3bb51507b7fd1d14c (diff) | |
download | gcc-b6d3c0311a633503f63884eb8eec3679256ace2c.zip gcc-b6d3c0311a633503f63884eb8eec3679256ace2c.tar.gz gcc-b6d3c0311a633503f63884eb8eec3679256ace2c.tar.bz2 |
re PR middle-end/67966 (ICE in convert_move, at expr.c:282)
PR middle-end/67966
* tree.c (verify_type): Verify that TYPE_MODE match
between TYPE_CANONICAL and type.
* expr.c (store_expr_with_bounds): Revert my previous change.
* expmed.c (store_bit_field_1): Revert prevoius change.
* gimple-expr.c (useless_type_conversion_p): Require TYPE_MODE
to match for all types.
From-SVN: r229132
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r-- | gcc/gimple-expr.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index 2a6ba1a..c6dd2eb 100644 --- a/gcc/gimple-expr.c +++ b/gcc/gimple-expr.c @@ -87,10 +87,8 @@ useless_type_conversion_p (tree outer_type, tree inner_type) if (inner_type == outer_type) return true; - /* Changes in machine mode are never useless conversions unless we - deal with aggregate types in which case we defer to later checks. */ - if (TYPE_MODE (inner_type) != TYPE_MODE (outer_type) - && !AGGREGATE_TYPE_P (inner_type)) + /* Changes in machine mode are never useless conversions unless. */ + if (TYPE_MODE (inner_type) != TYPE_MODE (outer_type)) return false; /* If both the inner and outer types are integral types, then the @@ -270,10 +268,9 @@ useless_type_conversion_p (tree outer_type, tree inner_type) use the types in move operations. */ else if (AGGREGATE_TYPE_P (inner_type) && TREE_CODE (inner_type) == TREE_CODE (outer_type)) - return (!TYPE_SIZE (outer_type) - || (TYPE_SIZE (inner_type) - && operand_equal_p (TYPE_SIZE (inner_type), - TYPE_SIZE (outer_type), 0))); + return (TYPE_MODE (outer_type) != BLKmode + || operand_equal_p (TYPE_SIZE (inner_type), + TYPE_SIZE (outer_type), 0)); else if (TREE_CODE (inner_type) == OFFSET_TYPE && TREE_CODE (outer_type) == OFFSET_TYPE) |