2020-03-18 Tobias Burnus <tobias@codesourcery.com>
* testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C: Add
#define DO_LONG_DOUBLE; set to 1, except for nvidia + gcn.
* libgomp.oacc-c-c++-common/firstprivate-mappings-1.c: Likewise.
* g++.dg/goacc/firstprivate-mappings-1.C: Only set DO_LONG_DOUBLE if
not defined; update comments.
* c-c++-common/goacc/firstprivate-mappings-1.c: Likewise.
gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c | 12 ++++--------
gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C | 12 ++++--------
libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C | 9 +++++++++
.../libgomp.oacc-c-c++-common/firstprivate-mappings-1.c | 9 +++++++++
4 files changed, 26 insertions(+), 16 deletions(-)
@@ -2,7 +2,9 @@
/* This file is also sourced from
'../../../../libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c'
- as an execution test. */
+ as an execution test.
+
+ 'long double' tests are compiled/used unless DO_LONG_DOUBLE is set to 0. */
/* See also '../../g++.dg/goacc/firstprivate-mappings-1.C'. */
@@ -24,13 +26,7 @@
# define HAVE_INT128 0
#endif
-
-/* The one is only relevant for offloading compilation; will always be enabled
- when doing tree scanning. */
-#ifdef ACC_DEVICE_TYPE_nvidia
-/* PR71064. */
-# define DO_LONG_DOUBLE 0
-#else
+#ifndef DO_LONG_DOUBLE
# define DO_LONG_DOUBLE 1
#endif
@@ -2,7 +2,9 @@
/* This file is also sourced from
'../../../../libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C'
- as an execution test. */
+ as an execution test.
+
+ 'long double' tests are compiled/used unless DO_LONG_DOUBLE is set to 0. */
/* See also '../../c-c++-common/goacc/firstprivate-mappings-1.c'. */
@@ -21,13 +23,7 @@
# define HAVE_INT128 0
#endif
-
-/* The one is only relevant for offloading compilation; will always be enabled
- when doing tree scanning. */
-#ifdef ACC_DEVICE_TYPE_nvidia
-/* PR71064. */
-# define DO_LONG_DOUBLE 0
-#else
+#ifndef DO_LONG_DOUBLE
# define DO_LONG_DOUBLE 1
#endif
@@ -1,3 +1,12 @@
/* Verify OpenACC 'firstprivate' mappings for C++ reference types. */
+/* PR middle-end/48591 */
+/* PR other/71064 */
+/* Set to 0 for offloading targets not supporting long double. */
+#if defined(ACC_DEVICE_TYPE_nvidia) || defined(ACC_DEVICE_TYPE_gcn)
+# define DO_LONG_DOUBLE 0
+#else
+# define DO_LONG_DOUBLE 1
+#endif
+
#include "../../../gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C"
@@ -3,4 +3,13 @@
/* { dg-additional-options "-Wno-psabi" } as apparently we're doing funny
things with vector arguments. */
+/* PR middle-end/48591 */
+/* PR other/71064 */
+/* Set to 0 for offloading targets not supporting long double. */
+#if defined(ACC_DEVICE_TYPE_nvidia) || defined(ACC_DEVICE_TYPE_gcn)
+# define DO_LONG_DOUBLE 0
+#else
+# define DO_LONG_DOUBLE 1
+#endif
+
#include "../../../gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c"