From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22721 invoked by alias); 23 Apr 2007 13:51:47 -0000 Received: (qmail 22667 invoked by uid 48); 23 Apr 2007 13:51:34 -0000 Date: Mon, 23 Apr 2007 13:51:00 -0000 Message-ID: <20070423135134.22666.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/31641] [4.1/4.2/4.3 Regression] ICE in s390_expand_setmem, at config/s390/s390.c:3618 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "uweigand 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: 2007-04/txt/msg01671.txt.bz2 ------- Comment #3 from uweigand at gcc dot gnu dot org 2007-04-23 14:51 ------- I don't think the patch is correct; according to the C standard, the third argument of memset is of type size_t, which must be an *unsigned* type, so it cannot in fact be negative. What apparently happens is that the argument (after conversion to size_t) is so big that it appears to be negative in its representation as CONST_INT, so the assert in s390.c triggers. A proper fix would probably be to remove the assert in s390_expand_setmem and at the same time make sure those big sizes are handled correctly. (In any case, the testcase certainly is broken anyway.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31641