From: Jeffrey A Law Date: Tue, 4 Nov 1997 23:07:18 +0000 (+0000) Subject: alias.c (find_base_value): When copying arguments, return the tenative value for... X-Git-Tag: releases/egcs-1.0.0~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2cf3141e12d7d9d8c97c1260ab0effbf26d1ab44;p=thirdparty%2Fgcc.git alias.c (find_base_value): When copying arguments, return the tenative value for a hard register. * alias.c (find_base_value): When copying arguments, return the tenative value for a hard register. Fixes infinite loop. From-SVN: r16318 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fdb1b1b255c6..1f125bc579f9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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) diff --git a/gcc/alias.c b/gcc/alias.c index 855abaeec204..0943444185a2 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -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: