Don't use MEM_ALIAS_SET on a REG
authorBernd Schmidt <bernds@redhat.com>
Wed, 3 Jan 2001 12:26:52 +0000 (12:26 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Wed, 3 Jan 2001 12:26:52 +0000 (12:26 +0000)
From-SVN: r38653

gcc/ChangeLog
gcc/builtins.c

index 6f16cc21b2cad39df540e36daf6089f1c3d40b6f..a623299f64e0809fda35da0c06bf7ebb4f78d92d 100644 (file)
@@ -1,3 +1,8 @@
+2001-01-01  Bernd Schmidt  <bernds@redhat.com>
+
+       * builtins.c (expand_builtin_return_addr): Don't use MEM_ALIAS_SET on
+       a REG rtx.
+
 2001-01-03  Alexandre Oliva  <aoliva@redhat.com>
 
        * combine.c (simplify_shift_const): Even if we're sign-extracting,
index 7cc917a7a1f2ad101d8bf56c75d39cb7481e267a..70a4b89be36791562c3caa524b609904234fd6a5 100644 (file)
@@ -432,8 +432,9 @@ expand_builtin_return_addr (fndecl_code, count, tem)
       tem = DYNAMIC_CHAIN_ADDRESS (tem);
 #endif
       tem = memory_address (Pmode, tem);
-      tem = copy_to_reg (gen_rtx_MEM (Pmode, tem));
+      tem = gen_rtx_MEM (Pmode, tem);
       MEM_ALIAS_SET (tem) = get_frame_alias_set ();
+      tem = copy_to_reg (tem);
     }
 
   /* For __builtin_frame_address, return what we've got.  */