From patchwork Fri Aug 5 22:11:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 108745 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B4C11B6F71 for ; Sat, 6 Aug 2011 08:11:27 +1000 (EST) Received: (qmail 1402 invoked by alias); 5 Aug 2011 22:11:26 -0000 Received: (qmail 1394 invoked by uid 22791); 5 Aug 2011 22:11:25 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 05 Aug 2011 22:11:12 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 05 Aug 2011 15:11:12 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 05 Aug 2011 15:11:12 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 34D91C0240; Fri, 5 Aug 2011 15:11:12 -0700 (PDT) Date: Fri, 5 Aug 2011 15:11:12 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: Re: PATCH: Add a testcase for PR middle-end/47364. Message-ID: <20110805221112.GA17845@intel.com> Reply-To: "H.J. Lu" References: <20110805220625.GA17775@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110805220625.GA17775@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Fri, Aug 05, 2011 at 03:06:25PM -0700, H.J. Lu wrote: > Hi, > > I checked in this patch to add a testcase for PR middle-end/47364. > I also checked in 2 other testcases. H.J. Index: gcc.target/i386/pr47364-1.c =================================================================== --- gcc.target/i386/pr47364-1.c (revision 0) +++ gcc.target/i386/pr47364-1.c (revision 177487) @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-O" } */ + +static unsigned char foo[256]; + +arc4_init(void) +{ + int n; + + for (n = 0; n < 256; n++) + foo[n] = n; +} Index: gcc.target/i386/pr47364-2.c =================================================================== --- gcc.target/i386/pr47364-2.c (revision 0) +++ gcc.target/i386/pr47364-2.c (revision 0) @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +extern __SIZE_TYPE__ strlen (const char *); +void foo (char *, const char *); +int bar (const char *prefix) +{ + char buff[256]; + foo (buff, prefix); + return strlen(buff); +} Index: ChangeLog =================================================================== --- ChangeLog (revision 177486) +++ ChangeLog (working copy) @@ -1,3 +1,10 @@ +2011-08-05 H.J. Lu + + PR middle-end/47364 + * gcc.dg/torture/pr47364-1.c: New. + * gcc.target/i386/pr47364-1.c: Likewise. + * gcc.target/i386/pr47364-2.c: Likewise. + 2011-08-05 Thomas Koenig PR fortran/37221 Index: gcc.dg/torture/pr47364-1.c =================================================================== --- gcc.dg/torture/pr47364-1.c (revision 0) +++ gcc.dg/torture/pr47364-1.c (revision 0) @@ -0,0 +1,8 @@ +/* { dg-do run } */ + +char one[50] = "ijk"; +int +main (void) +{ + return __builtin_strlen (one) != 3; +}