This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 9/9] Fix PR 66768
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 8 Oct 2015 15:59:35 +1100
- Subject: [PATCH 9/9] Fix PR 66768
- Authentication-results: sourceware.org; auth=none
- References: <1444280375-20866-1-git-send-email-rth at redhat dot com>
This is the patch that richi includes in the PR. There will need to
be an additional patch to solve an ICE for the AVR backend, as noted
in the PR, but this is good enough to solve the bad-code generation
problem for the i386 backend.
* tree-ssa-address.c (create_mem_ref_raw): Retain the correct
type for the address base.
---
gcc/tree-ssa-address.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/tree-ssa-address.c b/gcc/tree-ssa-address.c
index 042f9c9..bd10ae7 100644
--- a/gcc/tree-ssa-address.c
+++ b/gcc/tree-ssa-address.c
@@ -388,7 +388,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;
}
--
2.4.3