This is the mail archive of the gcc@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]

Re: A linux/alpha bug in egcs



  In message <m0xSYDD-0004ecC@ocean.lucon.org>you write:
  > While compiling linux 2.0.31 on linux/alpa, I encountered an egcs
  > bug:
  > 
  > # gcc -O -S foo.c 
  > foo.c: In function `flush_to_ldisc':
  > foo.c:21: virtual memory exhausted
Thanks.  I think this patch should fix the alpha & aix4.2 problems.

Aundrey -- can you verify this fixes your problem -- I haven't
actually built a ppc/rs6000 compiler to test this patch on it.

        * alias.c (find_base_value): When copying arguments, return the
        tenative value for a hard register.

Index: alias.c
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/alias.c,v
retrieving revision 1.15
diff -c -3 -p -r1.15 alias.c
*** alias.c	1997/11/02 06:28:31	1.15
--- alias.c	1997/11/04 23:04:34
*************** find_base_value (src)
*** 95,110 ****
        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)];
        return src;
  
      case MEM:
--- 95,113 ----
        return src;
  
      case REG:
        /* 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:


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