This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gen_mem_addressof buglet


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.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]