[libgomp, testsuite] Use dg-set-target-env-var instead of setenv
2018-04-16 Tom de Vries <tom@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(-)
@@ -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);
}
@@ -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);
}