From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 937 invoked by alias); 24 Dec 2002 00:36: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 914 invoked by uid 71); 24 Dec 2002 00:36:01 -0000 Date: Mon, 23 Dec 2002 16:36:00 -0000 Message-ID: <20021224003601.912.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Janis Johnson Subject: Re: optimization/8634: [3.2/3.3 regression] incorrect code for inlining of memcpy under -O2 Reply-To: Janis Johnson X-SW-Source: 2002-12/txt/msg01253.txt.bz2 List-Id: The following reply was made to PR optimization/8634; it has been noted by GNATS. From: Janis Johnson To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, duchier@ps.uni-sb.de, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org Cc: Subject: Re: optimization/8634: [3.2/3.3 regression] incorrect code for inlining of memcpy under -O2 Date: Mon, 23 Dec 2002 16:37:21 -0800 The regression reported in PR optimization/8634 showed up starting with this patch (strange but true): Fri Dec 21 23:30:14 CET 2001 Jan Hubicka * i386.h (TARGET_CPU_DEFAULT_pentium_mmx): New. (TARGET_CPU_DEFAULT_*): Renumber. I used this test case that Wolfgang provided. It aborts when the wrong code is generated for -O2 on i686-linux: -------------- /* incorrect code for inlining of memcpy under -O2 */ #include #include int main () { int i; char buffer[8]; const char head[8] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' }; memcpy (buffer, head, 8); for (i = 0; i < 8; i++) if (head[i] != buffer[i]) abort (); return 0; } -------------- http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8634