https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108899

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think we usually do renames only conditionally, so perhaps:
2023-02-23  Jakub Jelinek  <ja...@redhat.com>

        PR testsuite/108899
        * g++.dg/modules/modules.exp: Only override unsupported if it
        exists and saved-unsupported doesn't.

--- gcc/testsuite/g++.dg/modules/modules.exp.jj 2023-02-22 20:50:34.208421799
+0100
+++ gcc/testsuite/g++.dg/modules/modules.exp    2023-02-23 13:07:40.207320104
+0100
@@ -319,11 +319,15 @@ cleanup_module_files [find $DEFAULT_REPO
 # so that, after an unsupported result in dg-test, we can skip rather
 # than fail subsequent related tests.
 set module_do {"compile" "P"}
-rename unsupported saved-unsupported
-proc unsupported { args } {
-    global module_do
-    lset module_do 1 "N"
-    return [saved-unsupported $args]
+if { [info procs unsupported] != [list] \
+      && [info procs saved-unsupported] == [list] } {
+    rename unsupported saved-unsupported
+
+    proc unsupported { args } {
+       global module_do
+       lset module_do 1 "N"
+       return [saved-unsupported $args]
+    }
 }

 # not grouped tests, sadly tcl doesn't have negated glob

Though, I don't see such an error in my make check logs, so can't test if it
fixes for you.

Reply via email to