]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
GCN, nvptx offloading: Restrain 'WARNING: program timed out.' while in 'dynamic_cast...
authorThomas Schwinge <tschwinge@baylibre.com>
Wed, 16 Jul 2025 20:13:46 +0000 (22:13 +0200)
committerThomas Schwinge <tschwinge@baylibre.com>
Thu, 17 Jul 2025 12:53:41 +0000 (14:53 +0200)
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.

libgomp/testsuite/libgomp.c++/pr119692-1-4.C
libgomp/testsuite/libgomp.c++/pr119692-1-5.C
libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C
libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C
libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C
libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C

index af9fe1c8c183fcb3fb9c5e1843fa321fa2ac88d9..d329ad394f08aad9fb31bdf06f1a688419c88759 100644 (file)
@@ -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"
index e5c6e077fc8d0a523ed6942668979085c0b52a0c..6bbe1864fa57ba26a0ec1704a0ddfc965a721441 100644 (file)
@@ -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"
index a862652f4a8e6f35873019a9de3658085a04d7a7..4158eced10bfc7e277c44599b88408a18aaa8b0f 100644 (file)
@@ -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.  */
index ff15c9fa61f60ad74e9062ff4275e73c5564cf57..ca72e577f761a8c887299dede75b97c3062cbdf5 100644 (file)
@@ -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.  */
index 6957a6caec7032206c499adad8c7ecd040487f6c..e6cbe17f4145b3ee6b196dac302af1fccbe4b262 100644 (file)
@@ -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.  */
index 0f84cf212c259563d8c62638e61633a8778275bb..599425ff3eeb953fc13b43eada50835f68051ad8 100644 (file)
@@ -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.  */