https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69504
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- I think at some point the FEs created array-refs here. I think I suggested that elsewhere during last stage1 but nobody implemented that ... (now it's already again quite late). Thus for vector[i] create ARRAY_REF<VIEW_CONVERT <array-type-for-vector-type> (vector), i> avoiding the need to take the address of vector. Thus instead of bool non_lvalue = convert_vector_to_pointer_for_subscript (loc, &array, index); convert the vector to an array type via a VIEW_CONVERT. That should work for both r and lvalues. Of course it may trigger interesting new paths should this survive until RTL expansion ;) The other option is in convert_vector_to_pointer_for_subscript, force the !lvalue_p path for DECL_HARD_REGISTER *vecp.