From patchwork Thu Jun 16 06:42:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 100597 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 9EAD5B6F9D for ; Thu, 16 Jun 2011 16:42:14 +1000 (EST) Received: (qmail 19157 invoked by alias); 16 Jun 2011 06:42:13 -0000 Received: (qmail 19145 invoked by uid 22791); 16 Jun 2011 06:42:12 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_05, RCVD_IN_DNSWL_NONE, SPF_FAIL X-Spam-Check-By: sourceware.org Received: from smtp-vbr2.xs4all.nl (HELO smtp-vbr2.xs4all.nl) (194.109.24.22) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 06:41:47 +0000 Received: from [192.168.1.68] (teejay.xs4all.nl [213.84.119.160]) (authenticated bits=0) by smtp-vbr2.xs4all.nl (8.13.8/8.13.8) with ESMTP id p5G6fhga057935 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 16 Jun 2011 08:41:44 +0200 (CEST) (envelope-from vries@codesourcery.com) Message-ID: <4DF9A5E9.8080703@codesourcery.com> Date: Thu, 16 Jun 2011 08:42:49 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110424 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Zdenek Dvorak CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH PR45098] Disallow NULL pointer in pointer arithmetic References: <4DF9A526.9060906@codesourcery.com> In-Reply-To: <4DF9A526.9060906@codesourcery.com> 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 06/16/2011 08:39 AM, Tom de Vries wrote: > I will sent the adapted test cases in a separate email. Update 2 test cases to be more strict, and more like the original example. Thanks, - Tom 2011-06-15 Tom de Vries PR target/45098 * gcc.target/arm/ivopts-3.c: Update test. * gcc.target/arm/ivopts-5.c: Same. diff -u gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0) gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0) --- gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0) +++ gcc/testsuite/gcc.target/arm/ivopts-3.c (revision 0) @@ -8,14 +8,8 @@ { int sum = 0; unsigned int x; - x = 0; - while (1) - { - sum += foo2 (&array[x]); - if (!(x < n)) - break; - x++; - } + for (x = 0; x < n; ++x) + sum += foo2 (&array[x]); return sum; } diff -u gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0) gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0) --- gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0) +++ gcc/testsuite/gcc.target/arm/ivopts-5.c (revision 0) @@ -8,14 +8,8 @@ { int sum = 0; unsigned int x; - x = 0; - while (1) - { - sum += foo (&array[x]); - if (!(x < n)) - break; - x++; - } + for (x = 0; x < n; ++x) + sum += foo (&array[x]); return sum; }