This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

Re: optimization/7690: gcc 2.95.3: argument destroyed under -O2 on IA32


The following reply was made to PR optimization/7690; it has been noted by GNATS.

From: Chris Torek <torek@bsdi.com>
To: gcc-gnats@gcc.gnu.org
Cc: torek@bsdi.com
Subject: Re: optimization/7690: gcc 2.95.3: argument destroyed under -O2 on IA32
Date: Thu, 22 Aug 2002 19:04:27 -0600

 Followup: the following patch appears to fix the problem.
 (The patch is certainly safe, but might not be the right
 way to go about this.  Someone who understands the intent
 of the code, and whether reg/v really means what I suggest,
 and so on, should decide such things.)
 
 Chris
 
 Index: regmove.c
 ===================================================================
 RCS file: /master/usr.bin/egcs/D/gcc/regmove.c,v
 retrieving revision 1.1.1.2
 diff -c -2 -r1.1.1.2 regmove.c
 *** regmove.c	1999/12/09 18:08:07	1.1.1.2
 --- regmove.c	2002/08/23 00:12:50
 ***************
 *** 702,705 ****
 --- 702,712 ----
       return;
   
 +   /* torek: if the insn at "set" sets a "volatile" pseudo-reg, that means
 +      it is the name of a variable in the source; if we change its size
 +      here, later passes may think it really is that large and wipe out
 +      adjacent variables. */
 +   if (MEM_VOLATILE_P (SET_DEST (set)))
 +     return;
 + 
     /* Do not use a SUBREG to truncate from one mode to another if truncation
        is not a nop.  */


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