diff options
author | Thomas Schwinge <tschwinge@baylibre.com> | 2025-07-16 22:13:46 +0200 |
---|---|---|
committer | Thomas Schwinge <tschwinge@baylibre.com> | 2025-07-21 16:28:49 +0200 |
commit | a1c99e0a33c2be1c1e21d0d1a9255f5d327ac5c5 (patch) | |
tree | d85146c3f9f16086be5c229bf12e6ec36a923636 | |
parent | aed9e682c0f8dc1df660a90a57995f9f431601fe (diff) | |
download | gcc-a1c99e0a33c2be1c1e21d0d1a9255f5d327ac5c5.zip gcc-a1c99e0a33c2be1c1e21d0d1a9255f5d327ac5c5.tar.gz gcc-a1c99e0a33c2be1c1e21d0d1a9255f5d327ac5c5.tar.bz2 |
GCN, nvptx offloading: Restrain 'WARNING: program timed out.' while in 'dynamic_cast' only for effective-target 'offload_device' [PR119692]
In PR119692 "C++ 'typeinfo', 'vtable' vs. OpenACC, OpenMP 'target' offloading":
> --- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> ---
> The last commit made things worse on sparc-sun-solaris2.11: since that one
> (dg-timeout 10) I regularly get
>
> WARNING: libgomp.c++/target-exceptions-bad_cast-1.C (test for excess errors)
> program timed out.
> FAIL: libgomp.c++/target-exceptions-bad_cast-1.C (test for excess errors)
> UNRESOLVED: libgomp.c++/target-exceptions-bad_cast-1.C compilation failed to produce executable
> UNRESOLVED: libgomp.c++/target-exceptions-bad_cast-1.C scan-tree-dump-times optimized "gimple_call <__cxa_bad_cast, " 1
>
> Before that, the test had no issue. Compiling the test on an unloaded system
> usually takes less than 1 sec, but when fully loaded, times can go up.
To keep things simple, let's restrict this temporary (yeah...) workaround to
apply only for effective-target 'offload_device', just like the
'dg-xfail-run-if' itself.
PR target/119692
libgomp/
* testsuite/libgomp.c++/pr119692-1-4.C: '{ dg-timeout 10 { target offload_device } }'.
* testsuite/libgomp.c++/pr119692-1-5.C: Likewise.
* testsuite/libgomp.c++/target-exceptions-bad_cast-1.C: Likewise.
* testsuite/libgomp.c++/target-exceptions-bad_cast-2.C: Likewise.
* testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C: Likewise.
* testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C: Likewise.
(cherry picked from commit aa143261bdf6db4334b3fcad7768b53e231f998e)
6 files changed, 6 insertions, 6 deletions
diff --git a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C index af9fe1c..d329ad3 100644 --- a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C +++ b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C @@ -5,7 +5,7 @@ { dg-xfail-run-if PR119692 { offload_device } } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ /* { dg-additional-options -fdump-tree-gimple } */ #include "pr119692-1-1.C" diff --git a/libgomp/testsuite/libgomp.c++/pr119692-1-5.C b/libgomp/testsuite/libgomp.c++/pr119692-1-5.C index e5c6e07..6bbe186 100644 --- a/libgomp/testsuite/libgomp.c++/pr119692-1-5.C +++ b/libgomp/testsuite/libgomp.c++/pr119692-1-5.C @@ -5,7 +5,7 @@ { dg-xfail-run-if PR119692 { offload_device } } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ /* { dg-additional-options -fdump-tree-gimple } */ #include "pr119692-1-1.C" diff --git a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C index a862652..4158ece 100644 --- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C +++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C @@ -25,4 +25,4 @@ { dg-shouldfail {'std::bad_cast' exception} } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C index ff15c9f..ca72e57 100644 --- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C +++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C @@ -24,4 +24,4 @@ { dg-shouldfail {'MyException' exception} { offload_device } } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C index 6957a6c..e6cbe17 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C @@ -54,4 +54,4 @@ int main() { dg-shouldfail {'std::bad_cast' exception} } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ diff --git a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C index 0f84cf2..599425f 100644 --- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C +++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C @@ -60,4 +60,4 @@ int main() { dg-shouldfail {'std::bad_cast' exception} { ! openacc_host_selected } } */ /* There are configurations where we 'WARNING: program timed out.' while in 'dynamic_cast', see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119692#c6>. - { dg-timeout 10 } ... to make sure that happens quickly. */ + { dg-timeout 10 { target offload_device } } ... to make sure that happens quickly. */ |