diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2025-07-03 14:44:21 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2025-07-03 15:33:52 +0200 |
commit | 7abb8d05c3a7ef3df5a8a477bda72ceaf0b1cd42 (patch) | |
tree | 1657e6405fa0900a1ad5064b8258ab60fb997dad /gcc | |
parent | 78c6033c44731e5fcb4d5453bab2f180ef7fc5d7 (diff) | |
download | gcc-7abb8d05c3a7ef3df5a8a477bda72ceaf0b1cd42.zip gcc-7abb8d05c3a7ef3df5a8a477bda72ceaf0b1cd42.tar.gz gcc-7abb8d05c3a7ef3df5a8a477bda72ceaf0b1cd42.tar.bz2 |
OpenMP: Add omp_get_initial_device/omp_get_num_devices builtins: Fix test cases
With this fix-up for commit 387209938d2c476a67966c6ddbdbf817626f24a2
"OpenMP: Add omp_get_initial_device/omp_get_num_devices builtins", we progress:
PASS: c-c++-common/gomp/omp_get_num_devices_initial_device.c (test for excess errors)
PASS: c-c++-common/gomp/omp_get_num_devices_initial_device.c scan-tree-dump-not optimized "abort"
-FAIL: c-c++-common/gomp/omp_get_num_devices_initial_device.c scan-tree-dump-times optimized "omp_get_num_devices;" 1
+PASS: c-c++-common/gomp/omp_get_num_devices_initial_device.c scan-tree-dump-times optimized "omp_get_num_devices" 1
PASS: c-c++-common/gomp/omp_get_num_devices_initial_device.c scan-tree-dump optimized "_1 = __builtin_omp_get_num_devices \\(\\);[\\r\\n]+[ ]+return _1;"
... etc. for offloading configurations.
gcc/testsuite/
* c-c++-common/gomp/omp_get_num_devices_initial_device.c: Fix.
* gfortran.dg/gomp/omp_get_num_devices_initial_device.f90: Likewise.
(cherry picked from commit 13c766066e23eb6ddf6bad7a5664b9d3ca8c1974)
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/c-c++-common/gomp/omp_get_num_devices_initial_device.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/gomp/omp_get_num_devices_initial_device.f90 | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/c-c++-common/gomp/omp_get_num_devices_initial_device.c b/gcc/testsuite/c-c++-common/gomp/omp_get_num_devices_initial_device.c index 4b17143..6e2c1a8 100644 --- a/gcc/testsuite/c-c++-common/gomp/omp_get_num_devices_initial_device.c +++ b/gcc/testsuite/c-c++-common/gomp/omp_get_num_devices_initial_device.c @@ -25,8 +25,8 @@ int f() /* { dg-final { scan-tree-dump-not "abort" "optimized" } } */ -/* { dg-final { scan-tree-dump-not "omp_get_num_devices;" "optimized" { target { ! offloading_enabled } } } } */ +/* { dg-final { scan-tree-dump-not "omp_get_num_devices" "optimized" { target { ! offloading_enabled } } } } */ /* { dg-final { scan-tree-dump "return 0;" "optimized" { target { ! offloading_enabled } } } } */ -/* { dg-final { scan-tree-dump-times "omp_get_num_devices;" 1 "optimized" { target offloading_enabled } } } */ +/* { dg-final { scan-tree-dump-times "omp_get_num_devices" 1 "optimized" { target offloading_enabled } } } */ /* { dg-final { scan-tree-dump "_1 = __builtin_omp_get_num_devices \\(\\);\[\\r\\n\]+\[ \]+return _1;" "optimized" { target offloading_enabled } } } */ diff --git a/gcc/testsuite/gfortran.dg/gomp/omp_get_num_devices_initial_device.f90 b/gcc/testsuite/gfortran.dg/gomp/omp_get_num_devices_initial_device.f90 index 5409f12..279656b 100644 --- a/gcc/testsuite/gfortran.dg/gomp/omp_get_num_devices_initial_device.f90 +++ b/gcc/testsuite/gfortran.dg/gomp/omp_get_num_devices_initial_device.f90 @@ -17,8 +17,8 @@ end ! { dg-final { scan-tree-dump-not "error_stop" "optimized" } } -! { dg-final { scan-tree-dump-not "omp_get_num_devices;" "optimized" { target { ! offloading_enabled } } } } +! { dg-final { scan-tree-dump-not "omp_get_num_devices" "optimized" { target { ! offloading_enabled } } } } ! { dg-final { scan-tree-dump "return 0;" "optimized" { target { ! offloading_enabled } } } } -! { dg-final { scan-tree-dump-times "omp_get_num_devices;" 1 "optimized" { target offloading_enabled } } } +! { dg-final { scan-tree-dump-times "omp_get_num_devices" 1 "optimized" { target offloading_enabled } } } ! { dg-final { scan-tree-dump "_1 = __builtin_omp_get_num_devices \\(\\);\[\\r\\n\]+\[ \]+return _1;" "optimized" { target offloading_enabled } } } |