The ungrouped modules test loop does not reset module_do between
tests.  If a previous test calls unsupported, module_do can remain
set to {"compile" "N"}, causing the CMI checks for subsequent
tests to be skipped.

Reset module_do at the beginning of each iteration, as is already
done for grouped modules tests.

gcc/testsuite/ChangeLog:

        * g++.dg/modules/modules.exp:
---
 gcc/testsuite/g++.dg/modules/modules.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/testsuite/g++.dg/modules/modules.exp 
b/gcc/testsuite/g++.dg/modules/modules.exp
index 3afbcb39e10..a34c76a8051 100644
--- a/gcc/testsuite/g++.dg/modules/modules.exp
+++ b/gcc/testsuite/g++.dg/modules/modules.exp
@@ -363,6 +363,7 @@ foreach test [prune [lsort [find $srcdir/$subdir {*.[CH]}]] 
\
        foreach std $std_list {
            global module_cmis
            set module_cmis {}
+           set module_do {"compile" "P"}
            verbose "Testing $nshort $std" 1
            dg-test $test "$std" $DEFAULT_MODFLAGS
            if { [lindex $module_do 1] == "N" } {
-- 
2.43.0

Reply via email to