aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 9c2d2a6..943a4c4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -5671,6 +5671,13 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
{
size_tree = TREE_OPERAND (exp, 1);
*punsignedp = BIT_FIELD_REF_UNSIGNED (exp);
+
+ /* For vector types, with the correct size of access, use the mode of
+ inner type. */
+ if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == VECTOR_TYPE
+ && TREE_TYPE (exp) == TREE_TYPE (TREE_TYPE (TREE_OPERAND (exp, 0)))
+ && tree_int_cst_equal (size_tree, TYPE_SIZE (TREE_TYPE (exp))))
+ mode = TYPE_MODE (TREE_TYPE (exp));
}
else
{