aboutsummaryrefslogtreecommitdiff
path: root/libgomp/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'libgomp/testsuite')
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1031.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1032.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1033.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1034.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1035.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1101.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1102.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1150.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1151.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1152.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx1153.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx902.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx904.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx909.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c25
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4-gfx950.c33
-rw-r--r--libgomp/testsuite/libgomp.c/declare-variant-4.h153
30 files changed, 998 insertions, 0 deletions
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c
new file mode 100644
index 0000000..b7b95e6
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c
@@ -0,0 +1,25 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx10-3-generic } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx10_3_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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c
index d98d5ef..3703e96 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1030 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1031.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1031.c
new file mode 100644
index 0000000..e0d6289
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1031.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1031 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1031 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1032.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1032.c
new file mode 100644
index 0000000..46174cc2
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1032.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1032 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1032 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1033.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1033.c
new file mode 100644
index 0000000..1bd6e66
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1033.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1033 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1033 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1034.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1034.c
new file mode 100644
index 0000000..4f67a73
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1034.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1034 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1034 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1035.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1035.c
new file mode 100644
index 0000000..a69d5e7
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1035.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1035 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1035 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c
index 93b8641..8c258c4 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1036 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c
new file mode 100644
index 0000000..fa9efb4
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c
@@ -0,0 +1,25 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx11-generic } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx11_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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c
index 6ade352..f0b7c6d 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1100 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1101.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1101.c
new file mode 100644
index 0000000..213e904
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1101.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1101 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1101 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1102.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1102.c
new file mode 100644
index 0000000..3f68dc8
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1102.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1102 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1102 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c
index 6a6dc4f..c1eed44 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1103 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1150.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1150.c
new file mode 100644
index 0000000..39d64ca
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1150.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1150 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1150 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1151.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1151.c
new file mode 100644
index 0000000..2a0c732
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1151.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1151 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1151 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1152.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1152.c
new file mode 100644
index 0000000..3c987dd
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1152.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1152 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1152 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1153.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1153.c
new file mode 100644
index 0000000..7d38b82
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx1153.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx1153 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx1153 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
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
new file mode 100644
index 0000000..07d1254
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
@@ -0,0 +1,25 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx9-4-generic } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c
new file mode 100644
index 0000000..d6ba097
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c
@@ -0,0 +1,25 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx9-generic } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx9_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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c
index f3f5244..37005fc 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx900 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx902.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx902.c
new file mode 100644
index 0000000..82981c5
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx902.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx902 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx902 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx904.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx904.c
new file mode 100644
index 0000000..89815fe
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx904.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx904 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx904 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c
index ac43388..aeef690 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx906 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c
index f60741f..799b546 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx908 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx909.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx909.c
new file mode 100644
index 0000000..e8a6f63
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx909.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx909 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx909 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c
index 832d174..de5626e 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx90a \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c
index 44629a8..dfad7ec 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx90c \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c
index d1df550..c8c7446 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c
@@ -6,3 +6,28 @@
#include "declare-variant-4.h"
/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx942 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4-gfx950.c b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx950.c
new file mode 100644
index 0000000..af81f11
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4-gfx950.c
@@ -0,0 +1,33 @@
+/* { dg-do link { target { offload_target_amdgcn } } } */
+/* { dg-additional-options -foffload=amdgcn-amdhsa } */
+/* { dg-additional-options -foffload=-march=gfx950 } */
+/* { dg-additional-options "-foffload=-fdump-tree-optimized" } */
+
+#include "declare-variant-4.h"
+
+/* { dg-final { only_for_offload_target amdgcn-amdhsa scan-offload-tree-dump "= gfx950 \\(\\);" "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, there are two options:
+
+ * If the generic multi-lib is available, mkoffload fails early,
+ yielding UNRESOLVED for scan-offload-tree-dump and an XFAIL
+ for the message:
+ gcn mkoffload: fatal error: GCC was built without library support
+ for '-march=gfx...'; consider compiling for the associated
+ generic architecture '-march=gfx...-generic' instead
+
+ * Or compling succeeds - then 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. */
diff --git a/libgomp/testsuite/libgomp.c/declare-variant-4.h b/libgomp/testsuite/libgomp.c/declare-variant-4.h
index 2257f4c..dd97edb 100644
--- a/libgomp/testsuite/libgomp.c/declare-variant-4.h
+++ b/libgomp/testsuite/libgomp.c/declare-variant-4.h
@@ -9,6 +9,20 @@ gfx900 (void)
__attribute__ ((noipa))
int
+gfx902 (void)
+{
+ return 0x902;
+}
+
+__attribute__ ((noipa))
+int
+gfx904 (void)
+{
+ return 0x904;
+}
+
+__attribute__ ((noipa))
+int
gfx906 (void)
{
return 0x906;
@@ -23,6 +37,13 @@ gfx908 (void)
__attribute__ ((noipa))
int
+gfx909 (void)
+{
+ return 0x909;
+}
+
+__attribute__ ((noipa))
+int
gfx90a (void)
{
return 0x90a;
@@ -44,6 +65,13 @@ gfx942 (void)
__attribute__ ((noipa))
int
+gfx950 (void)
+{
+ return 0x950;
+}
+
+__attribute__ ((noipa))
+int
gfx1030 (void)
{
return 0x1030;
@@ -51,6 +79,41 @@ gfx1030 (void)
__attribute__ ((noipa))
int
+gfx1031 (void)
+{
+ return 0x1031;
+}
+
+__attribute__ ((noipa))
+int
+gfx1032 (void)
+{
+ return 0x1032;
+}
+
+__attribute__ ((noipa))
+int
+gfx1033 (void)
+{
+ return 0x1033;
+}
+
+__attribute__ ((noipa))
+int
+gfx1034 (void)
+{
+ return 0x1034;
+}
+
+__attribute__ ((noipa))
+int
+gfx1035 (void)
+{
+ return 0x1035;
+}
+
+__attribute__ ((noipa))
+int
gfx1036 (void)
{
return 0x1036;
@@ -65,21 +128,111 @@ gfx1100 (void)
__attribute__ ((noipa))
int
+gfx1101 (void)
+{
+ return 0x1101;
+}
+
+__attribute__ ((noipa))
+int
+gfx1102 (void)
+{
+ return 0x1102;
+}
+
+__attribute__ ((noipa))
+int
gfx1103 (void)
{
return 0x1103;
}
+__attribute__ ((noipa))
+int
+gfx1150 (void)
+{
+ return 0x1150;
+}
+
+__attribute__ ((noipa))
+int
+gfx1151 (void)
+{
+ return 0x1151;
+}
+
+__attribute__ ((noipa))
+int
+gfx1152 (void)
+{
+ return 0x1152;
+}
+
+__attribute__ ((noipa))
+int
+gfx1153 (void)
+{
+ return 0x1153;
+}
+
+__attribute__ ((noipa))
+int
+gfx9_generic (void)
+{
+ return 0x90ff;
+}
+
+__attribute__ ((noipa))
+int
+gfx9_4_generic (void)
+{
+ return 0x94ff;
+}
+
+__attribute__ ((noipa))
+int
+gfx10_3_generic (void)
+{
+ return 0x103ff;
+}
+
+__attribute__ ((noipa))
+int
+gfx11_generic (void)
+{
+ return 0x110ff;
+}
+
+
#pragma omp declare variant(gfx900) match(device = {isa("gfx900")})
+#pragma omp declare variant(gfx902) match(device = {isa("gfx902")})
+#pragma omp declare variant(gfx904) match(device = {isa("gfx904")})
#pragma omp declare variant(gfx906) match(device = {isa("gfx906")})
#pragma omp declare variant(gfx908) match(device = {isa("gfx908")})
+#pragma omp declare variant(gfx909) match(device = {isa("gfx909")})
#pragma omp declare variant(gfx90a) match(device = {isa("gfx90a")})
#pragma omp declare variant(gfx90c) match(device = {isa("gfx90c")})
#pragma omp declare variant(gfx942) match(device = {isa("gfx942")})
+#pragma omp declare variant(gfx950) match(device = {isa("gfx950")})
#pragma omp declare variant(gfx1030) match(device = {isa("gfx1030")})
+#pragma omp declare variant(gfx1031) match(device = {isa("gfx1031")})
+#pragma omp declare variant(gfx1032) match(device = {isa("gfx1032")})
+#pragma omp declare variant(gfx1033) match(device = {isa("gfx1033")})
+#pragma omp declare variant(gfx1034) match(device = {isa("gfx1034")})
+#pragma omp declare variant(gfx1035) match(device = {isa("gfx1035")})
#pragma omp declare variant(gfx1036) match(device = {isa("gfx1036")})
#pragma omp declare variant(gfx1100) match(device = {isa("gfx1100")})
+#pragma omp declare variant(gfx1101) match(device = {isa("gfx1101")})
+#pragma omp declare variant(gfx1102) match(device = {isa("gfx1102")})
#pragma omp declare variant(gfx1103) match(device = {isa("gfx1103")})
+#pragma omp declare variant(gfx1150) match(device = {isa("gfx1150")})
+#pragma omp declare variant(gfx1151) match(device = {isa("gfx1151")})
+#pragma omp declare variant(gfx1152) match(device = {isa("gfx1152")})
+#pragma omp declare variant(gfx1153) match(device = {isa("gfx1153")})
+#pragma omp declare variant(gfx9_generic) match(device = {isa("gfx9-generic")})
+#pragma omp declare variant(gfx9_4_generic) match(device = {isa("gfx9-4-generic")})
+#pragma omp declare variant(gfx10_3_generic) match(device = {isa("gfx10-3-generic")})
+#pragma omp declare variant(gfx11_generic) match(device = {isa("gfx11-generic")})
__attribute__ ((noipa))
int
f (void)