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  <t...@codesourcery.com>

	* 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 <stdlib.h>
 
 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 <stdlib.h>
 
 int main ()
 {
-  setenv ("GOMP_OPENACC_DIM", "8:16", 1);
-
   return test_1 (8, 16, 32);
 }

Reply via email to