This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
gen_mem_addressof buglet
- To: gcc-patches at gcc dot gnu dot org
- Subject: gen_mem_addressof buglet
- From: Richard Henderson <rth at redhat dot com>
- Date: Sun, 19 Aug 2001 02:06:26 -0700
2001-08-08 Jason Merrill <jason_merrill@redhat.com>
* function.c (gen_mem_addressof): Calculate the alias set before
touching the RTL.
This patch failed to consider the case of no decl. Fixes
an ia64 segfault.
r~
* function.c (gen_mem_addressof): Don't call get_alias_set if no decl.
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.297
diff -c -p -d -u -r1.297 function.c
--- function.c 2001/08/18 19:59:44 1.297
+++ function.c 2001/08/19 09:03:28
@@ -2863,7 +2863,7 @@ gen_mem_addressof (reg, decl)
REGNO (reg), decl);
/* Calculate this before we start messing with decl's RTL. */
- HOST_WIDE_INT set = get_alias_set (decl);
+ HOST_WIDE_INT set = decl ? get_alias_set (decl) : 0;
/* If the original REG was a user-variable, then so is the REG whose
address is being taken. Likewise for unchanging. */