re PR tree-optimization/66768 (address space gets lost on literal pointer)
authorRichard Henderson <rth@redhat.com>
Mon, 9 Nov 2015 09:18:16 +0000 (01:18 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Mon, 9 Nov 2015 09:18:16 +0000 (01:18 -0800)
PR tree-opt/66768

        * tree-ssa-address.c (create_mem_ref_raw): Use a pointer of
        the correct type for the base.

From-SVN: r229997

gcc/ChangeLog
gcc/tree-ssa-address.c

index c70ab87805993798873feaf07096e8667df26260..755337d44516bed67009365f260fb122cf5ca667 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-09  Richard Henderson  <rth@redhat.com>
+
+       PR tree-opt/66768
+       * tree-ssa-address.c (create_mem_ref_raw): Use a pointer of
+       the correct type for the base.
+
 2015-11-09  Jeff Law  <law@redhat.com>
 
        * tree-into-ssa.c (names_to_release): No longer static.
index 2c63f87dd002630d5856e5fe1edaa9d943c161c5..62b89e61d5379c8fc81866883a88c6f0f813cf85 100644 (file)
@@ -377,7 +377,7 @@ create_mem_ref_raw (tree type, tree alias_ptr_type, struct mem_address *addr,
     }
   else
     {
-      base = build_int_cst (ptr_type_node, 0);
+      base = build_int_cst (build_pointer_type (type), 0);
       index2 = addr->base;
     }