From patchwork Fri Nov 12 16:30:34 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tobias Grosser X-Patchwork-Id: 70987 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 A3AB4B7144 for ; Sat, 13 Nov 2010 03:31:28 +1100 (EST) Received: (qmail 9149 invoked by alias); 12 Nov 2010 16:31:25 -0000 Received: (qmail 9051 invoked by uid 22791); 12 Nov 2010 16:31:23 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from out3.smtp.messagingengine.com (HELO out3.smtp.messagingengine.com) (66.111.4.27) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 12 Nov 2010 16:30:47 +0000 Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.messagingengine.com (Postfix) with ESMTP id 162088AE; Fri, 12 Nov 2010 11:30:46 -0500 (EST) Received: from frontend1.messagingengine.com ([10.202.2.160]) by compute3.internal (MEProxy); Fri, 12 Nov 2010 11:30:46 -0500 Received: from [128.146.27.103] (dhcp-128-146-27-103.osuwireless.ohio-state.edu [128.146.27.103]) by mail.messagingengine.com (Postfix) with ESMTPSA id BA4D140684D; Fri, 12 Nov 2010 11:30:45 -0500 (EST) Message-ID: <4CDD6BAA.9000208@fim.uni-passau.de> Date: Fri, 12 Nov 2010 11:30:34 -0500 From: Tobias Grosser User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9pre) Gecko/20100802 Lightning/1.0b2 Lanikai/3.1.2pre MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org CC: GCC GRAPHITE , Jack Howarth Subject: [PATCH] Remove warning while compiling with CLooG isl 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 Hi, this patch fixes a warning that appears when compiling graphite with CLooG isl. * graphite-cloog-util.c (oppose_constraint, cloog_matrix_to_ppl_constraint, new_Constraint_System_from_Cloog_Matrix): Explicitly cast to int as CLooG isl uses unsigned integers. This triggered a warning. @Jack: This patch should fix the compile failure with CLooG isl. Can you verify this? Cheers Tobi From 4ecdd356cd507dabeffc9c1b6c9f066a530624b7 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Fri, 12 Nov 2010 11:22:52 -0500 Subject: [PATCH] Remove warning because of CLooG isl/ppl difference * graphite-cloog-util.c (oppose_constraint, cloog_matrix_to_ppl_constraint, new_Constraint_System_from_Cloog_Matrix): Explicitly cast to int as CLooG isl uses unsigned integers. This triggered a warning. --- gcc/graphite-cloog-util.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/graphite-cloog-util.c b/gcc/graphite-cloog-util.c index 40c6fbc..df90b83 100644 --- a/gcc/graphite-cloog-util.c +++ b/gcc/graphite-cloog-util.c @@ -60,7 +60,10 @@ oppose_constraint (CloogMatrix *m, int row) int k; /* Do not oppose the first column: it is the eq/ineq one. */ - for (k = 1; k < m->NbColumns; k++) + /* Cast needed to remove warning that is generated as CLooG isl + is using an unsigned int for NbColumns and CLooG PPL is + using a signed int for NBColumns. */ + for (k = 1; k < (int)m->NbColumns; k++) mpz_neg (m->p[row][k], m->p[row][k]); } @@ -177,7 +180,10 @@ cloog_matrix_to_ppl_constraint (CloogMatrix *matrix, int row) ppl_new_Coefficient (&coef); ppl_new_Linear_Expression_with_dimension (&expr, dim); - for (j = 1; j < matrix->NbColumns - 1; j++) + /* Cast needed to remove warning that is generated as CLooG isl + is using an unsigned int for NbColumns and CLooG PPL is + using a signed int for NBColumns. */ + for (j = 1; j < (int)matrix->NbColumns - 1; j++) { ppl_assign_Coefficient_from_mpz_t (coef, matrix->p[row][j]); ppl_Linear_Expression_add_to_coefficient (expr, j - 1, coef); @@ -207,7 +213,10 @@ new_Constraint_System_from_Cloog_Matrix (ppl_Constraint_System_t *pcs, ppl_new_Constraint_System (pcs); - for (i = 0; i < matrix->NbRows; i++) + /* Cast needed to remove warning that is generated as CLooG isl + is using an unsigned int for NbColumns and CLooG PPL is + using a signed int for NBColumns. */ + for (i = 0; i < (int)matrix->NbRows; i++) { ppl_Constraint_t c = cloog_matrix_to_ppl_constraint (matrix, i); ppl_Constraint_System_insert_Constraint (*pcs, c); -- 1.7.1