From patchwork Fri Mar 27 12:19:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 455398 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41EDC1400D5 for ; Fri, 27 Mar 2015 23:20:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jZhofwvo; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=abDyV0SXk01QNAzl+gJlSvdFYtPlFU1NAJ4d75hh0/U PH3D/SWZ3MBCAZodHdRHG/ROHM8/kJmS3UnMGklmwmHV6OFKG2d+6YBPCZobiteC Ni0C2EPxy9CXR08lS2tWtSPJFtrpSd6W+OvUJ7CqDoKkRULTRI7Mq1fcM+N/MWco = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=Dt0cREE058eCadn+rgOQMbZ2iWg=; b=jZhofwvogoAOwWGmF 9+ACx/fN+jtY5YGF1x8Ij8KM8JC0xwofB5FPayi4U9Kmh7uARgllb0WGbh3EOea6 UK3Hl8ykhRPiAk1na62kXOTDC5xfqEpIZtTs8S3XRdEAgHW/BHYYUQ1z0J4+cxxj uEDFavCk063IK2sfi99pudZKWU= Received: (qmail 42926 invoked by alias); 27 Mar 2015 12:19:51 -0000 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 Received: (qmail 42854 invoked by uid 89); 27 Mar 2015 12:19:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 27 Mar 2015 12:19:50 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1YbTEo-0004fL-Kl from Tom_deVries@mentor.com ; Fri, 27 Mar 2015 05:19:47 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.224.2; Fri, 27 Mar 2015 12:19:45 +0000 Message-ID: <55154ADE.3040109@mentor.com> Date: Fri, 27 Mar 2015 13:19:42 +0100 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: GCC Patches CC: Jakub Jelinek Subject: [Committed][testsuite][PR65594] Add verification to libgomp.graphite/force-parallel-6.c Hi, this patch adds verification to libgomp.graphite/force-parallel-6.c. Committed as approved by Jakub here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65594#c8 . Thanks, - Tom Add verification to libgomp.graphite/force-parallel-6.c 2015-03-27 Tom de Vries * testsuite/libgomp.graphite/force-parallel-6.c (abort): Declare. (init, check): New function. (foo): Change return type to void. (main): Call init and check. --- .../testsuite/libgomp.graphite/force-parallel-6.c | 52 ++++++++++++++++++++-- 1 file changed, 49 insertions(+), 3 deletions(-) diff --git a/libgomp/testsuite/libgomp.graphite/force-parallel-6.c b/libgomp/testsuite/libgomp.graphite/force-parallel-6.c index e9e4b56..cbc5735 100644 --- a/libgomp/testsuite/libgomp.graphite/force-parallel-6.c +++ b/libgomp/testsuite/libgomp.graphite/force-parallel-6.c @@ -1,10 +1,31 @@ +void abort (void); + #define N 500 #define M 50 int X[2*N], Y[2*N], B[2*N]; int A[2*N][2*N], C[2*N][2*N]; -int foo(void) +static void __attribute__((noinline,noclone)) +init (void) +{ + volatile int i, j; + + for (i = 0; i < 2 * N; ++i) + { + B[i] = 1; + X[i] = 1; + Y[i] = 1; + for (j = 0; j < 2 * N; ++j) + { + A[i][j] = 1; + C[i][j] = 1; + } + } +} + +static void __attribute__((noinline,noclone)) +foo (void) { int i, j, k; @@ -21,13 +42,38 @@ int foo(void) Y[i+j] = A[j+1][N]; } } +} - return A[1][5]*B[6]; +static void __attribute__((noinline,noclone)) +check (void) +{ + volatile int i, j; + + for (i = 0; i < 2 * N; ++i) + { + int expect_x = i < M ? 11 : 1; + + if (B[i] != 1 + || X[i] != expect_x + || Y[i] != 1) + abort (); + + for (j = 0; j < 2 * N; ++j) + { + int expect_a = (0 < i && i <= M && j < N) ? 2 : 1; + + if (A[i][j] != expect_a + || C[i][j] != 1) + abort (); + } + } } int main(void) { - foo(); + init (); + foo (); + check (); return 0; } -- 1.9.1