@@ -1,3 +1,14 @@
+2019-09-17 Julian Brown <julian@codesourcery.com>
+
+ * testsuite/libgomp.oacc-c-c++-common/async_queue-1.c: Only run
+ NVidia-specific test on NVidia hardware.
+ * testsuite/libgomp.oacc-c-c++-common/asyncwait-nop-1.c (main):
+ Initialise for acc_device_gcn if testing on AMD GCN.
+ * testsuite/libgomp.oacc-c-c++-common/function-not-offloaded.c: Support
+ AMD GCN.
+ * testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c (check): Skip
+ vector dimension test for AMD GCN.
+
2019-09-13 Tobias Burnus <tobias@codesourcery.com>
* plugin/plugin-gcn.c (hsa_warn, hsa_fatal, hsa_error): Ensure
@@ -1,3 +1,5 @@
+/* { dg-do run { target openacc_nvidia_accel_selected } } */
+
/* Test mapping of async values to specific underlying queues. */
#undef NDEBUG
@@ -26,6 +26,8 @@ main ()
acc_device_t d;
#if defined ACC_DEVICE_TYPE_nvidia
d = acc_device_nvidia;
+#elif defined ACC_DEVICE_TYPE_gcn
+ d = acc_device_gcn;
#elif defined ACC_DEVICE_TYPE_host
d = acc_device_host;
#else
@@ -1,11 +1,11 @@
/* { dg-do link } */
-/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target openacc_nvidia_accel_selected } } */
+/* { dg-excess-errors "lto1, mkoffload and lto-wrapper fatal errors" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
int var;
#pragma acc declare create (var)
void __attribute__((noinline, noclone))
-foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target openacc_nvidia_accel_selected } } */
+foo () /* { dg-error "function 'foo' has been referenced in offloaded code but hasn't been marked to be included in the offloaded code" "" { target { openacc_nvidia_accel_selected || openacc_amdgcn_accel_selected } } } */
{
var++;
}
@@ -80,13 +80,18 @@ int check (const int *ary, int size, int gp, int wp, int vp)
exit = 1;
}
+#ifndef ACC_DEVICE_TYPE_gcn
+ /* AMD GCN uses the autovectorizer for the vector dimension: the use
+ of a function call in vector-partitioned code in this test is not
+ currently supported. */
for (ix = 0; ix < vp; ix++)
if (vectors[ix] != vectors[0])
{
- printf ("vector %d not used %d times\n", ix, vectors[0]);
- exit = 1;
+ printf ("vector %d not used %d times\n", ix, vectors[0]); exit
+ = 1;
}
-
+#endif
+
return exit;
}