]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (find_base_value): When copying arguments, return the tenative value for...
authorJeffrey A Law <law@cygnus.com>
Tue, 4 Nov 1997 23:07:18 +0000 (23:07 +0000)
committerJeff Law <law@gcc.gnu.org>
Tue, 4 Nov 1997 23:07:18 +0000 (16:07 -0700)
        * alias.c (find_base_value): When copying arguments, return the
        tenative value for a hard register.
Fixes infinite loop.

From-SVN: r16318

gcc/ChangeLog
gcc/alias.c

index fdb1b1b255c6ecd44d069929f81422648ff530c7..1f125bc579f95c9fdaf30b37dd1a79a4c1e5ae84 100644 (file)
@@ -1,3 +1,8 @@
+Tue Nov  4 16:07:15 1997  Jeffrey A Law  (law@cygnus.com)
+
+       * alias.c (find_base_value): When copying arguments, return the
+       tenative value for a hard register.
+
 Tue Nov  4 14:12:30 1997  Richard Henderson  (rth@cygnus.com)
                          Jim Wilson  (wilson@cygnus.com)
 
index 855abaeec20460b5e93afabecf32bc5b4bb7192e..0943444185a2c3b00cbc93fa4d486dc38879af40 100644 (file)
@@ -95,16 +95,19 @@ find_base_value (src)
       return src;
 
     case REG:
-      /* If this REG is related to a known base value, return it.  */
-      if (reg_base_value[REGNO (src)])
-       return reg_base_value[REGNO (src)];
-
       /* At the start of a function argument registers have known base
         values which may be lost later.  Returning an ADDRESS
         expression here allows optimization based on argument values
         even when the argument registers are used for other purposes.  */
       if (REGNO (src) < FIRST_PSEUDO_REGISTER && copying_arguments)
        return new_reg_base_value[REGNO (src)];
+
+      /* If this REG is related to a known base value, return it.
+        This must happen after the arg register check above to avoid
+        circular set chains.  */
+      if (reg_base_value[REGNO (src)])
+       return reg_base_value[REGNO (src)];
+
       return src;
 
     case MEM: