From patchwork Mon Apr 16 19:59:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 898907 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-476445-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=mentor.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="F8gwV5pg"; dkim-atps=neutral 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 40Pzk96SDXz9s19 for ; Tue, 17 Apr 2018 05:59:44 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to:cc :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Fu4X11QwKOnCGrNVNClwbRNdjfRUNgEHi/Ag3gr+hOvGY1WI85 bMHibMiWng5DiJbZQ6XK/XO70e5+lcxdWCOgQldxm8WC4EHLciHMLpRRV8fETeDk J0Be+C+KqvrRe5/6zjbMoJnTw9RI/hqmaLZsJOQiPMkQBwy6t6nAdYJsA= 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:to:cc :from:subject:message-id:date:mime-version:content-type; s= default; bh=Xvor4DcTtV0qjVqiRTDbMcYz2FU=; b=F8gwV5pgrvq78S5dl1lF fx9QgqokONsVEH8YDlFeqQCPmZfA0V0wdA0hB+YlSF9gGiP7suzGdSNAA3bzygUK TQ2mVh57LE8T0w2iFL7kbaiocNsf9ORpF5Uh7aaEQg5CjWieURZqOh7MHQHOtl5k jEpWxUicYfxkqILpVDSXx4Q= Received: (qmail 120664 invoked by alias); 16 Apr 2018 19:59:37 -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 120654 invoked by uid 89); 16 Apr 2018 19:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= 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; Mon, 16 Apr 2018 19:59:35 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1f8AHl-0004RR-LB from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Mon, 16 Apr 2018 12:59:33 -0700 Received: from [172.30.72.215] (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 16 Apr 2018 20:59:29 +0100 To: Thomas Schwinge CC: GCC Patches From: Tom de Vries Subject: [libgomp, testsuite] Use dg-set-target-env-var instead of setenv Message-ID: <5bf10eca-0f71-f00a-70d3-be890fc5cc22@mentor.com> Date: Mon, 16 Apr 2018 21:59:28 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Hi, given the stage1 approval for "[openacc, PR85411] Move GOMP_OPENACC_DIM parsing out of nvptx plugin", setenv for GOMP_OPENACC_DIM won't work on trunk anymore, so there's no sense in using it on the og7 branch. Committed as attached. [ We may want to commit that patch to og7 as well, but given the extra symbol added to the plugin interface, I'm not sure about timing. ] Thanks, - Tom [libgomp, testsuite] Use dg-set-target-env-var instead of setenv 2018-04-16 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c: Use dg-set-target-env-var instead of setenv. * testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c: Same. --- libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c | 4 +--- libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c index ec3ca52..6c479e4 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-compile.c @@ -2,14 +2,12 @@ /* This code uses nvptx inline assembly guarded with acc_on_device, which is not optimized away at -O0, and then confuses the target assembler. { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" "8:8" } */ #include "loop-default.h" -#include int main () { /* Environment should be ignored. */ - setenv ("GOMP_OPENACC_DIM", "8:8", 1); - return test_1 (16, 16, 32); } diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c index e61203d..eb00d32 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/loop-default-runtime.c @@ -2,13 +2,11 @@ /* This code uses nvptx inline assembly guarded with acc_on_device, which is not optimized away at -O0, and then confuses the target assembler. { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */ +/* { dg-set-target-env-var "GOMP_OPENACC_DIM" "8:16" } */ #include "loop-default.h" -#include int main () { - setenv ("GOMP_OPENACC_DIM", "8:16", 1); - return test_1 (8, 16, 32); }