
For the tests modified below, the effective target line has to be effective when compiling for an offload target, except that variable-not-offloaded.c would compile with unified-share memory and pr86416-*.c if long double/float128 is supported. The previous check used a run-time device ability check. This new variant now enables those dg- lines when _compiling_ for nvptx or gcn. libgomp/ChangeLog: * testsuite/lib/libgomp.exp (offload_target_to_openacc_device_type): New, based on check_effective_target_offload_target_nvptx. (check_effective_target_offload_target_nvptx): Call it. (check_effective_target_offload_target_amdgcn): New. * testsuite/libgomp.c-c++-common/function-not-offloaded.c: Require target offload_target_nvptx || offload_target_amdgcn. * testsuite/libgomp.c-c++-common/variable-not-offloaded.c: Likewise. * testsuite/libgomp.c/pr86416-1.c: Likewise. * testsuite/libgomp.c/pr86416-2.c: Likewise.
22 lines
639 B
C
22 lines
639 B
C
/* { dg-do link { target __float128 } } */
|
|
/* { dg-add-options __float128 } */
|
|
|
|
/* PR middle-end/86416 */
|
|
/* { dg-error "bit-precision floating-point numbers unsupported .mode '.F'." "" { target { offload_target_nvptx || offload_target_amdgcn } } 0 } */
|
|
/* { dg-excess-errors "Follow-up errors from mkoffload and lto-wrapper" { target { offload_target_nvptx || offload_target_amdgcn } } } */
|
|
|
|
#include <stdlib.h> /* For abort. */
|
|
|
|
__float128 foo(__float128 y)
|
|
{
|
|
#pragma omp target map(tofrom: y)
|
|
y *= 4.0;
|
|
return y;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
__float128 v = foo (5.0Q) - 20.0Q;
|
|
if (v > 1.0e-5Q || v < -1.0e-5Q) abort();
|
|
return 0;
|
|
}
|