From: Richard Henderson Date: Mon, 9 Nov 2015 09:18:16 +0000 (-0800) Subject: re PR tree-optimization/66768 (address space gets lost on literal pointer) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0ebde5acecc9fd69fd6dc1c8a9dd568edf96747;p=gcc.git re PR tree-optimization/66768 (address space gets lost on literal pointer) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c70ab878059..755337d4451 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-09 Richard Henderson + + 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 * tree-into-ssa.c (names_to_release): No longer static. diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c index 2c63f87dd00..62b89e61d53 100644 --- a/gcc/tree-ssa-address.c +++ b/gcc/tree-ssa-address.c @@ -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; }