From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2063 invoked by alias); 3 Jan 2009 08:47:28 -0000 Received: (qmail 1951 invoked by uid 48); 3 Jan 2009 08:46:07 -0000 Date: Sat, 03 Jan 2009 08:47:00 -0000 Message-ID: <20090103084607.1950.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/38708] [4.4 Regression] Revision 137646 caused gcc.c-torture/execute/memset-[23].c fail with -mtune=pentiumpro In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-01/txt/msg00252.txt.bz2 ------- Comment #5 from jakub at gcc dot gnu dot org 2009-01-03 08:46 ------- There are several issues. One is what H.J. mentioned, seen e.g. on: char buf[8] __attribute__((aligned)); char A = 'A'; int len = 1; void __attribute__((noinline)) check (void) { if (__builtin_memcmp (buf, "\0\0A\0\0\0\0\0", 8)) __builtin_abort (); } int main () { __builtin_memset (buf + 2, A, len); check (); return 0; } with -O -mtune=pentium-m -m32. This can be fixed by adding max_size = smallest_pow2_greater_than (max_size - 1); at the start of expand_setmem_epilogue_via_loop. But another testcase with the same options that still fails is: char buf[8] __attribute__((aligned)) = "AAAAAAAA"; char A = 'A'; int len = 4; void __attribute__((noinline)) check (void) { if (__builtin_memcmp (buf, "AAAA\0\0\0\0", 8)) __builtin_abort (); } int main () { __builtin_memset (buf + 4, '\0', len); check (); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38708