The following makes sure to use the correct pointer mode when
building pointer types to a non-default address-space.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

        * tree-vect-data-refs.cc (vect_create_data_ref_ptr): Use
        the default mode when building a pointer.
---
 gcc/tree-vect-data-refs.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 2ca5a1b131b..f79ade9509b 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -5323,7 +5323,7 @@ vect_create_data_ref_ptr (vec_info *vinfo, stmt_vec_info 
stmt_info,
        }
       while (sinfo);
     }
-  aggr_ptr_type = build_pointer_type_for_mode (aggr_type, ptr_mode,
+  aggr_ptr_type = build_pointer_type_for_mode (aggr_type, VOIDmode,
                                               need_ref_all);
   aggr_ptr = vect_get_new_vect_var (aggr_ptr_type, vect_pointer_var, 
base_name);
 
-- 
2.35.3

Reply via email to