]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libgomp.c/target-51.c: Accept more error-msg variants in dg-output
authorTobias Burnus <tobias@codesourcery.com>
Mon, 19 Jun 2023 07:52:10 +0000 (09:52 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 19 Jun 2023 07:57:34 +0000 (09:57 +0200)
Depending on the details, the testcase can fail with different but
related messages; all of the following all could be observed for this
testcase:

  libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device cannot be used for offloading
  libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found
  libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available

Before, the last two were tested for with 'target offload_device' and
'! offload_device', respectively. Now, all three are accepted by matching
'.*' already after 'but' and without distinguishing whether the effective
target is an offload_device or not.

(For completeness, there is a fourth error that follows this pattern:
'OMP_TARGET_OFFLOAD is set to MANDATORY, but device is finalized'.)

libgomp/

* testsuite/libgomp.c/target-51.c: Accept more error msg variants
as expected dg-output.

libgomp/testsuite/libgomp.c/target-51.c

index bbe9ade6e24babd6f6254232ce141edb12c06af6..db0363bfc149d92f0b0160c211fd7aace35463d9 100644 (file)
@@ -9,8 +9,7 @@
 
 /* See comment in target-50.c/target-50.c for why the output differs.  */
 
-/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but only the host device is available.*" { target { ! offload_device } } } */
-/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but device not found.*" { target offload_device } } */
+/* { dg-output ".*libgomp: OMP_TARGET_OFFLOAD is set to MANDATORY, but .*" } } */
 
 int
 main ()