From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7925 invoked by alias); 1 Oct 2002 21:19: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 7906 invoked by uid 61); 1 Oct 2002 21:19:01 -0000 Date: Tue, 01 Oct 2002 14:19:00 -0000 Message-ID: <20021001211901.7905.qmail@sources.redhat.com> To: dyatchkov@mcst.ru, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org From: rth@gcc.gnu.org Reply-To: rth@gcc.gnu.org, dyatchkov@mcst.ru, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: optimization/8110: GCC 3.2: wrong code optimization with -O2 X-SW-Source: 2002-10/txt/msg00024.txt.bz2 List-Id: Synopsis: GCC 3.2: wrong code optimization with -O2 State-Changed-From-To: open->closed State-Changed-By: rth State-Changed-When: Tue Oct 1 14:19:00 2002 State-Changed-Why: The code in rtx_alloc is broken in spec2k. Use the following. --- rtl.c.orig Tue Oct 1 14:16:34 2002 +++ rtl.c Tue Oct 1 14:17:35 2002 @@ -234,9 +234,7 @@ one int, but we don't want to assume that and it isn't very portable anyway; this is. */ - length = (sizeof (struct rtx_def) - sizeof (rtunion) - 1) / sizeof (int); - for (; length >= 0; length--) - ((int *) rt)[length] = 0; + memset (rt, 0, sizeof (struct rtx_def) - sizeof (rtunion)); PUT_CODE (rt, code); http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8110