aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKwok Cheung Yeung <kcy@codesourcery.com>2020-06-26 10:35:36 -0700
committerKwok Cheung Yeung <kcy@codesourcery.com>2020-06-26 11:22:45 -0700
commit0fce12c0920c12492c878c0ca5f639f93b93f183 (patch)
tree0f38b1d17b0ca226b231f257ab8f15f5ae08a02d /gcc
parentb3d77404c060c0d65d8d4c97254995737d0fc032 (diff)
downloadgcc-0fce12c0920c12492c878c0ca5f639f93b93f183.zip
gcc-0fce12c0920c12492c878c0ca5f639f93b93f183.tar.gz
gcc-0fce12c0920c12492c878c0ca5f639f93b93f183.tar.bz2
Fix failure in gfortran.dg/gomp/combined-if.f90 test
Enabling nvptx offloading results in extra '#pragma omp simd' statements in the tree dump with an extra '_simt_'. 2020-06-26 Kwok Cheung Yeung <kcy@codesourcery.com> gcc/testsuite/ * gfortran.dg/gomp/combined-if.f90: Adjust expected number of matches depending on whether nvptx offloading is supported. * lib/target-supports.exp (check_effective_target_offload_nvptx): New.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/combined-if.f903
-rw-r--r--gcc/testsuite/lib/target-supports.exp10
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/testsuite/gfortran.dg/gomp/combined-if.f90 b/gcc/testsuite/gfortran.dg/gomp/combined-if.f90
index bf4a9a8..0bb6c28 100644
--- a/gcc/testsuite/gfortran.dg/gomp/combined-if.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/combined-if.f90
@@ -104,5 +104,6 @@ contains
end module
! { dg-final { scan-tree-dump-times "(?n)#pragma omp target.* if\\(" 9 "omplower" } }
-! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 7 "omplower" } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 4 "omplower" { target { ! offload_nvptx } } } }
+! { dg-final { scan-tree-dump-times "(?n)#pragma omp simd.* if\\(" 7 "omplower" { target { offload_nvptx } } } }
! { dg-final { scan-tree-dump-times "(?n)#pragma omp parallel.* if\\(" 6 "omplower" } }
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index cf0cfa1..2279361 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -9820,6 +9820,14 @@ proc check_effective_target_vect_max_reduc { } {
return 0
}
+# Return 1 if the compiler has been configured with nvptx offloading.
+
+proc check_effective_target_offload_nvptx { } {
+ return [check_no_compiler_messages offload_nvptx assembly {
+ int main () {return 0;}
+ } "-foffload=nvptx-none" ]
+}
+
# Return 1 if the compiler has been configured with hsa offloading.
proc check_effective_target_offload_hsa { } {
@@ -9828,7 +9836,7 @@ proc check_effective_target_offload_hsa { } {
} "-foffload=hsa" ]
}
-# Return 1 if the compiler has been configured with hsa offloading.
+# Return 1 if the compiler has been configured with gcn offloading.
proc check_effective_target_offload_gcn { } {
return [check_no_compiler_messages offload_gcn assembly {