aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index e9d8555..8011638 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -7032,7 +7032,16 @@ get_inner_reference (tree exp, HOST_WIDE_INT *pbitsize,
size. */
mode = TYPE_MODE (DECL_BIT_FIELD_TYPE (field));
else if (!DECL_BIT_FIELD (field))
- mode = DECL_MODE (field);
+ {
+ mode = DECL_MODE (field);
+ /* For vector fields re-check the target flags, as DECL_MODE
+ could have been set with different target flags than
+ the current function has. */
+ if (mode == BLKmode
+ && VECTOR_TYPE_P (TREE_TYPE (field))
+ && VECTOR_MODE_P (TYPE_MODE_RAW (TREE_TYPE (field))))
+ mode = TYPE_MODE (TREE_TYPE (field));
+ }
else if (DECL_MODE (field) == BLKmode)
blkmode_bitfield = true;