From patchwork Thu Sep 15 08:20:25 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: 114767 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 2F3E9B6F76 for ; Thu, 15 Sep 2011 18:20:59 +1000 (EST) Received: (qmail 20420 invoked by alias); 15 Sep 2011 08:20:43 -0000 Received: (qmail 20402 invoked by uid 22791); 15 Sep 2011 08:20:39 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Sep 2011 08:20:25 +0000 Received: from nat-dem.mentorg.com ([195.212.93.2] helo=eu2-mail.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R47BG-00051c-8r from Tom_deVries@mentor.com ; Thu, 15 Sep 2011 01:20:22 -0700 Received: from [127.0.0.1] ([172.16.63.104]) by eu2-mail.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 15 Sep 2011 10:20:21 +0200 Message-ID: <4E71B549.6010404@mentor.com> Date: Thu, 15 Sep 2011 10:20:25 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13 MIME-Version: 1.0 To: Zdenek Dvorak CC: Mike Stump , Georg-Johann Lay , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH, PR50322] Fix test-case ivopts-lt.c to use int of same size as pointer. References: <4E709480.8050601@mentor.com> <20110914163526.GA13075@kam.mff.cuni.cz> In-Reply-To: <20110914163526.GA13075@kam.mff.cuni.cz> 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 09/14/2011 06:35 PM, Zdenek Dvorak wrote: > Hi, > >> The attached patch fixes PR50322. >> >> The test-case is supposed to succeed if the loop counter data-type has the same >> size as a pointer. The patch defines TYPE to be an int datatype of the same size >> as a pointer, and uses it. After this fix, there's no need for the avr xfails >> anymore. >> >> tested with avr, x86_64 and x86_64 -m32. > > what about using uintptr_t? > That's shorter indeed. Tested with x86_64 and x86_64 -m32. When running on my gcc+binutils avr build, the test is listed as unsupported because it doesn't contain stdint.h, but I think that just means that libc is missing in my build setup. OK for trunk? > Zdenek > 2011-09-14 Tom de Vries PR testsuite/50322 * gcc.dg/tree-ssa/ivopts-lt.c: require stdint_types. include stdint.h. Use uintptr_t in f1. Undo avr xfails. Index: gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c =================================================================== --- gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c (revision 178804) +++ gcc/testsuite/gcc.dg/tree-ssa/ivopts-lt.c (working copy) @@ -1,8 +1,11 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-ivopts" } */ +/* { dg-require-effective-target stdint_types } */ + +#include "stdint.h" void -f1 (char *p, unsigned long int i, unsigned long int n) +f1 (char *p, uintptr_t i, uintptr_t n) { p += i; do @@ -14,8 +17,7 @@ f1 (char *p, unsigned long int i, unsign while (i < n); } -/* For the fails on avr see PR tree-optimization/50322. */ -/* { dg-final { scan-tree-dump-times "PHI" 1 "ivopts" { xfail { "avr-*-*" } } } } */ +/* { dg-final { scan-tree-dump-times "PHI" 1 "ivopts" } } */ /* { dg-final { scan-tree-dump-times "PHI