diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2015-11-08 18:33:42 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2015-11-08 18:33:42 +0000 |
commit | ee45a32dae253f7daa966573eb8cb64b2cf7bf52 (patch) | |
tree | cf927ff52a6d5ba28290472db09363fe67a835d6 /gcc/gimple-expr.c | |
parent | eb11eb157cf07500e2915da8a72f2f3a501cc5ae (diff) | |
download | gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.zip gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.gz gcc-ee45a32dae253f7daa966573eb8cb64b2cf7bf52.tar.bz2 |
Merge of the scalar-storage-order branch.
From-SVN: r229965
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r-- | gcc/gimple-expr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index dd2550a..e9c631d 100644 --- a/gcc/gimple-expr.c +++ b/gcc/gimple-expr.c @@ -152,14 +152,16 @@ useless_type_conversion_p (tree outer_type, tree inner_type) else if (TREE_CODE (inner_type) == ARRAY_TYPE && TREE_CODE (outer_type) == ARRAY_TYPE) { - /* Preserve string attributes. */ + /* Preserve various attributes. */ + if (TYPE_REVERSE_STORAGE_ORDER (inner_type) + != TYPE_REVERSE_STORAGE_ORDER (outer_type)) + return false; if (TYPE_STRING_FLAG (inner_type) != TYPE_STRING_FLAG (outer_type)) return false; /* Conversions from array types with unknown extent to array types with known extent are not useless. */ - if (!TYPE_DOMAIN (inner_type) - && TYPE_DOMAIN (outer_type)) + if (!TYPE_DOMAIN (inner_type) && TYPE_DOMAIN (outer_type)) return false; /* Nor are conversions from array types with non-constant size to |