The two OpenACC firstprivate-mappings-1.{c,C} testcases use long double, but not with nvidia – this also disables it for gcn.
Additionally, it moves the '#define DO_LONG_DOUBLE 0' to the libgomp file (before it was in the included ../../gcc/testsuite file). Committed as r10-7238-g4da9288745d8f9c0d6918b685522e89c277020c7 Cheers, Tobias PS: Without that patch, it fails with: lto1: fatal error: amdgcn-amdhsa - 80-bit-precision floating-point numbers unsupported (mode 'XF') ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter
2020-03-18 Tobias Burnus <tob...@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(-) diff --git a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c index 33576c50eca..7987beaed9a 100644 --- a/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c +++ b/gcc/testsuite/c-c++-common/goacc/firstprivate-mappings-1.c @@ -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 diff --git a/gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C b/gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C index 639bf3f3299..1b1badb1a90 100644 --- a/gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C +++ b/gcc/testsuite/g++.dg/goacc/firstprivate-mappings-1.C @@ -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 diff --git a/libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C b/libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C index c8dba9e5d1c..7b3e670073c 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C +++ b/libgomp/testsuite/libgomp.oacc-c++/firstprivate-mappings-1.C @@ -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" diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c index 4a8b310414c..253f8bf0bd0 100644 --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-mappings-1.c +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/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"