From 5d0bc70ae482221dacc08ebfb155c4841eeceefb Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 9 Jan 2019 00:07:55 +0000 Subject: [PATCH] [libgomp, testsuite, openacc] Don't use const int for dimensions Const int is handled differently at -O0 for -xc and -xc++, which can cause noise in testsuite/libgomp.oacc-c-c++-common test-cases (which are both run for c and c++) if const int is used for launch dimensions. Fix this by using #defines instead. 2019-01-09 Tom de Vries PR target/88756 * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (ng, nw, vl): Use #define instead of "const int". * testsuite/libgomp.oacc-c-c++-common/reduction-2.c (ng, nw, vl): Same. * testsuite/libgomp.oacc-c-c++-common/reduction-3.c (ng, nw, vl): Same. * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (ng, nw, vl): Same. * testsuite/libgomp.oacc-c-c++-common/reduction-5.c (ng, nw, vl): Same. From-SVN: r267747 --- libgomp/ChangeLog | 10 ++++++++++ .../testsuite/libgomp.oacc-c-c++-common/reduction-1.c | 6 +++--- .../testsuite/libgomp.oacc-c-c++-common/reduction-2.c | 6 +++--- .../testsuite/libgomp.oacc-c-c++-common/reduction-3.c | 6 +++--- .../testsuite/libgomp.oacc-c-c++-common/reduction-4.c | 6 +++--- .../testsuite/libgomp.oacc-c-c++-common/reduction-5.c | 6 +++--- 6 files changed, 25 insertions(+), 15 deletions(-) diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index fba0ba0562a..f9539545015 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,13 @@ +2019-01-09 Tom de Vries + + PR target/88756 + * testsuite/libgomp.oacc-c-c++-common/reduction-1.c (ng, nw, vl): Use + #define instead of "const int". + * testsuite/libgomp.oacc-c-c++-common/reduction-2.c (ng, nw, vl): Same. + * testsuite/libgomp.oacc-c-c++-common/reduction-3.c (ng, nw, vl): Same. + * testsuite/libgomp.oacc-c-c++-common/reduction-4.c (ng, nw, vl): Same. + * testsuite/libgomp.oacc-c-c++-common/reduction-5.c (ng, nw, vl): Same. + 2019-01-09 Tom de Vries * plugin/plugin-nvptx.c (nvptx_exec): Make sure to launch with at least diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c index e8a8911faeb..3fe9ae65309 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c @@ -8,9 +8,9 @@ #include #include "reduction.h" -const int ng = 8; -const int nw = 4; -const int vl = 32; +#define ng 8 +#define nw 4 +#define vl 32 static void test_reductions (void) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c index d19b1c825ca..83986abf7e0 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c @@ -8,9 +8,9 @@ #include #include "reduction.h" -const int ng = 8; -const int nw = 4; -const int vl = 32; +#define ng 8 +#define nw 4 +#define vl 32 static void test_reductions (void) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c index 1b948bef5a0..3ac0f996a86 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-3.c @@ -8,9 +8,9 @@ #include #include "reduction.h" -const int ng = 8; -const int nw = 4; -const int vl = 32; +#define ng 8 +#define nw 4 +#define vl 32 static void test_reductions (void) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c index 79355eded80..b8fa954cfee 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-4.c @@ -9,9 +9,9 @@ #include #include "reduction.h" -const int ng = 8; -const int nw = 4; -const int vl = 32; +#define ng 8 +#define nw 4 +#define vl 32 static void test_reductions (void) diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c index 46b553a61ff..215d919a103 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-5.c @@ -9,9 +9,9 @@ #include #include -const int ng = 8; -const int nw = 4; -const int vl = 32; +#define ng 8 +#define nw 4 +#define vl 32 const int n = 100; -- 2.30.2