]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gfortran.dg/gomp/metadirective-3.f90: xfail on offload_nvptx
authorTobias Burnus <tburnus@baylibre.com>
Tue, 18 Feb 2025 14:48:39 +0000 (15:48 +0100)
committerTobias Burnus <tburnus@baylibre.com>
Tue, 18 Feb 2025 14:48:39 +0000 (15:48 +0100)
Currently, 'target' with a nested metadirective creating a 'teams' will
fail with a bogus error ("‘target’ construct with nested ‘teams’ construct
contains directives outside of the ‘teams’ construct").
That's tracked at PR118694 - and, hence, expected.

However, the testcase metadirective-3.f90 triggers this when compiling for
'target offload_nvptx' (otherwise, the code is optimized away). Use xfail to
silence the error as it is known and there is a tracking PR.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/metadirective-3.f90: Add xfail when
compiling for offload_nvptx.

gcc/testsuite/gfortran.dg/gomp/metadirective-3.f90

index c5e25e598eb1d2ba554a781d2f986394d453f5d9..e2ebb0a39c1ee8e6776cde73e8d461042d0a6a0f 100644 (file)
@@ -22,4 +22,7 @@ end module
 !  that alternative and not produce a metadirective at all.  Otherwise this
 !  won't be resolved until late.
 ! { dg-final { scan-tree-dump-not "#pragma omp metadirective" "gimple" { target { ! offload_nvptx } } } }
-! { dg-final { scan-tree-dump "#pragma omp metadirective" "gimple" { target { offload_nvptx } } } }
+
+! The following two are xfail because the bogus error triggers and thus prevents the dump, cf. PR118694
+! { dg-final { scan-tree-dump "#pragma omp metadirective" "gimple" { target { offload_nvptx } xfail { offload_nvptx } } } }
+! { dg-bogus "'target' construct with nested 'teams' construct contains directives outside of the 'teams' construct" "PR118694" { xfail offload_nvptx } 10 }