aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c')
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
index 3921bdd..07d1254 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
@@ -6,3 +6,20 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx9_4_generic \\(\\);" "optimized" } } */
+
+
+/* This code will link nicely if the multilib for that GPU architecture
+ has been build for GCC. In that case, scan-offload-tree-dump will
+ PASS and the linking will yield an XPASS message due to following line: */
+
+/* { dg-excess-errors "ld: error: unable to find library -lgomp|gcn mkoffload: fatal error" } */
+
+/* If the multi-lib config is not available (as this is a generic config),
+ scan-offload-tree-dump will PASS - but linking fails with the
+ following error (XFAIL):
+ ld: error: unable to find library -lgomp
+ collect2: error: ld returned 1 exit status
+ gcn mkoffload: fatal error: ...-gnu-accel-amdgcn-amdhsa-gcc returned 1 exit status
+ compilation terminated.
+ lto-wrapper: fatal error: .../amdgcn-amdhsa/mkoffload returned 1 exit status
+ compilation terminated. */