https://gcc.gnu.org/g:b5f48e7872db30b8f174cb2c497868a358bf75d6

commit r16-566-gb5f48e7872db30b8f174cb2c497868a358bf75d6
Author: Thomas Schwinge <tschwi...@baylibre.com>
Date:   Fri May 9 14:49:03 2025 +0200

    GCN, nvptx offloading: Restrain 'WARNING: program timed out.' while in 
'dynamic_cast'" [PR119692]
    
            PR target/119692
            libgomp/
            * testsuite/libgomp.c++/pr119692-1-4.C: '{ dg-timeout 10 }'.
            * 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.

Diff:
---
 libgomp/testsuite/libgomp.c++/pr119692-1-4.C                 | 3 +++
 libgomp/testsuite/libgomp.c++/pr119692-1-5.C                 | 3 +++
 libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C | 3 +++
 libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C | 3 +++
 libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C   | 3 +++
 libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C   | 3 +++
 6 files changed, 18 insertions(+)

diff --git a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C 
b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C
index 6995f2633328..af9fe1c8c183 100644
--- a/libgomp/testsuite/libgomp.c++/pr119692-1-4.C
+++ b/libgomp/testsuite/libgomp.c++/pr119692-1-4.C
@@ -3,6 +3,9 @@
 /* { dg-additional-options -DDEFAULT=defaultmap(firstprivate) }
    Wrong code for offloading execution.
    { 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-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 02121b6e9c51..e5c6e077fc8d 100644
--- a/libgomp/testsuite/libgomp.c++/pr119692-1-5.C
+++ b/libgomp/testsuite/libgomp.c++/pr119692-1-5.C
@@ -3,6 +3,9 @@
 /* { dg-additional-options -DDEFAULT=defaultmap(to) }
    Wrong code for offloading execution.
    { 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-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 3848295fbabc..a862652f4a8e 100644
--- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C
+++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-1.C
@@ -23,3 +23,6 @@
    PR119692.
 
    { 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.  */
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 88617400a723..ff15c9fa61f6 100644
--- a/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C
+++ b/libgomp/testsuite/libgomp.c++/target-exceptions-bad_cast-2.C
@@ -22,3 +22,6 @@
 
    For GCN, nvptx offload execution, there is no 'catch'ing; any exception is 
fatal.
    { 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.  */
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 05456011ca1d..6957a6caec70 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-1.C
@@ -52,3 +52,6 @@ int main()
    PR119692.
 
    { 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.  */
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 24399eff978b..0f84cf212c25 100644
--- a/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C
+++ b/libgomp/testsuite/libgomp.oacc-c++/exceptions-bad_cast-2.C
@@ -58,3 +58,6 @@ int main()
 
    For GCN, nvptx offload execution, there is no 'catch'ing; any exception is 
fatal.
    { 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.  */

Reply via email to