From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12495 invoked by alias); 23 Aug 2002 01:06:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 12481 invoked by uid 71); 23 Aug 2002 01:06:00 -0000 Date: Fri, 23 Aug 2002 00:06:00 -0000 Message-ID: <20020823010600.12480.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Chris Torek Subject: Re: optimization/7690: gcc 2.95.3: argument destroyed under -O2 on IA32 Reply-To: Chris Torek X-SW-Source: 2002-08/txt/msg00482.txt.bz2 List-Id: The following reply was made to PR optimization/7690; it has been noted by GNATS. From: Chris Torek 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. */