]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp.c/declare-variant-4-gfx*: Add missing archs + dg-excess-errors
authorTobias Burnus <tburnus@baylibre.com>
Thu, 16 Oct 2025 09:11:39 +0000 (11:11 +0200)
committerTobias Burnus <tburnus@baylibre.com>
Thu, 16 Oct 2025 09:11:39 +0000 (11:11 +0200)
Add missing tests for gfx* context selectors; mark all but the
default-arch declare-variant-4.c with 'dg-excess-errors' to
silence libgomp not-found errors (still passing the
scan-offload-tree-dump check) - or at least causing just
UNRESOLVED errors if the error is
  "built without library support ... consider compiling for
   the associated generic architecture".

In case the multilib is configured, the result will be
an XPASS.

libgomp/ChangeLog:

* testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c: Add
dg-excess-errors to handle possible missing libgomp multi lib.
* testsuite/libgomp.c/declare-variant-4-gfx1030.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx1036.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx11-generic.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx1100.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx1103.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx9-generic.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx900.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx906.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx908.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx90a.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx90c.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx942.c: Likewise.
* testsuite/libgomp.c/declare-variant-4-gfx1031.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1032.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1033.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1034.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1035.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1101.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1102.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1150.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1151.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1152.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx1153.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx902.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx904.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx909.c: New test.
* testsuite/libgomp.c/declare-variant-4-gfx950.c: New test.

29 files changed:
libgomp/testsuite/libgomp.c/declare-variant-4-gfx10-3-generic.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1030.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1031.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1032.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1033.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1034.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1035.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1036.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx11-generic.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1100.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1101.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1102.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1103.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1150.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1151.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1152.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx1153.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-4-generic.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx9-generic.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx900.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx902.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx904.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx906.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx908.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx909.c [new file with mode: 0644]
libgomp/testsuite/libgomp.c/declare-variant-4-gfx90a.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx90c.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx942.c
libgomp/testsuite/libgomp.c/declare-variant-4-gfx950.c [new file with mode: 0644]

index 3df81a34fc9662eeec16eb1e9d4252e66ba83d33..b7b95e68ad8c404b06f432d3dcd09dc0d6710077 100644 (file)
@@ -6,3 +6,20 @@
 #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. */
index d98d5ef54ec7cfdecf1ce5cf2de03ea71aed8272..3703e961c0b38dc163421336cb8834a5da84edf4 100644 (file)
@@ -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 (file)
index 0000000..e0d6289
--- /dev/null
@@ -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 (file)
index 0000000..46174cc
--- /dev/null
@@ -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 (file)
index 0000000..1bd6e66
--- /dev/null
@@ -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 (file)
index 0000000..4f67a73
--- /dev/null
@@ -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 (file)
index 0000000..a69d5e7
--- /dev/null
@@ -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. */
index 93b8641b3e15bcb5a079bbaa758b9490e58b535c..8c258c4011db88f647bdc63dc36425528ce74402 100644 (file)
@@ -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. */
index ca03f4a2ede545e4c5ec7a47da65f1a80bb4f07c..fa9efb4cea4d9e75677534c9222bef44bb188326 100644 (file)
@@ -6,3 +6,20 @@
 #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. */
index 6ade35224cc4e401293aed0d731bac6a7f890d1c..f0b7c6db1ae671ee54efed7635a215aa2c852df4 100644 (file)
@@ -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 (file)
index 0000000..213e904
--- /dev/null
@@ -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 (file)
index 0000000..3f68dc8
--- /dev/null
@@ -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. */
index 6a6dc4fba3fd00640aa00d0c2951a54b1330d7af..c1eed448f8be3763736cb7371a21cca8bfd5b0b6 100644 (file)
@@ -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 (file)
index 0000000..39d64ca
--- /dev/null
@@ -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 (file)
index 0000000..2a0c732
--- /dev/null
@@ -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 (file)
index 0000000..3c987dd
--- /dev/null
@@ -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 (file)
index 0000000..7d38b82
--- /dev/null
@@ -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. */
index 3921bddbf80f31d161196cbd2ca2c5bafbd1c76e..07d1254bbb661db1860cb58056f9631f2f8de955 100644 (file)
@@ -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. */
index 5aa8a2e32241fdb3ae21a2c3662451e478bbd644..d6ba097ce392b7553f51e070fcff0315374ff5c7 100644 (file)
@@ -6,3 +6,20 @@
 #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. */
index f3f5244c7bc779109dcb7b4e395622c00c0b5346..37005fc5c7ff1da1b3587172a01aee78fed5d639 100644 (file)
@@ -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 (file)
index 0000000..82981c5
--- /dev/null
@@ -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 (file)
index 0000000..89815fe
--- /dev/null
@@ -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. */
index ac43388a59f0ebee858a4deee0b2fb373a842c99..aeef690f8708f4ccd3098b26bf19a3cfef85e745 100644 (file)
@@ -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. */
index f60741f202fac42e16dde0fba65485fa8b1b6171..799b5465bd43cab7d31b1c867898098b706f2eb3 100644 (file)
@@ -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 (file)
index 0000000..e8a6f63
--- /dev/null
@@ -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. */
index 832d174e4a5b2b7ee73ee8d606ced73f8bdf760c..de5626efff8b0f5066509d17e9de11db50385f49 100644 (file)
@@ -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. */
index 44629a806b46ae107e4041a119233648146ed5c3..dfad7ece1c955b8701239400e5c4ef41258f76f6 100644 (file)
@@ -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. */
index d1df5500d5f96800f8793ed3aa04806e617f12ed..c8c744662b1aeb5f22dd170a52dcd92be8426603 100644 (file)
@@ -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 (file)
index 0000000..af81f11
--- /dev/null
@@ -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. */