https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107304
--- Comment #19 from H.J. Lu <hjl.tools at gmail dot com> --- This seems to work: diff --git a/gcc/expr.cc b/gcc/expr.cc index 4c892d69249..b55736945c9 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -7902,6 +7902,11 @@ get_inner_reference (tree exp, poly_int64_pod *pbitsize, && VECTOR_TYPE_P (TREE_TYPE (field)) && VECTOR_MODE_P (TYPE_MODE_RAW (TREE_TYPE (field)))) mode = TYPE_MODE (TREE_TYPE (field)); + /* Target attribute can change a vector mode to unsupported + on per-function basis. */ + else if (VECTOR_MODE_P (mode) + && vector_type_mode (TREE_TYPE (field)) == BLKmode) + mode = BLKmode; } else if (DECL_MODE (field) == BLKmode) blkmode_bitfield = true;