On Thu, Feb 19, 2026 at 3:28 PM Andrew Pinski
<[email protected]> wrote:
>
> On Wed, Feb 18, 2026 at 1:08 PM Jonathan Wakely <[email protected]> wrote:
> >
> > This simplifies the v3-minimum-std procedure slightly, but the main
> > advantage is making v3_modules_std depend on v3_max_std so that we don't
> > have to update two separate variables when new effective targets such as
> > c++29 get added.
>
> I am getting these error messages now after this patch.
>
> +ERROR: tcl error code TCL WRONGARGS
> +ERROR: tcl error code TCL WRONGARGS
> +ERROR: tcl error code TCL WRONGARGS
> +ERROR: tcl error code TCL WRONGARGS
> +ERROR: tcl error sourcing
> /home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
> +ERROR: tcl error sourcing
> /home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
> +ERROR: tcl error sourcing
> /home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
> +ERROR: tcl error sourcing
> /home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp.
> +UNRESOLVED: testcase
> '/home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp'
> aborted due to Tcl error
> +UNRESOLVED: testcase
> '/home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp'
> aborted due to Tcl error
> +UNRESOLVED: testcase
> '/home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp'
> aborted due to Tcl error
> +UNRESOLVED: testcase
> '/home/apinski/src/upstream-gcc-git/gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp'
> aborted due to Tcl error
> +ERROR: wrong # args: should be "v3-minimum-std test default_std max_std"
> +ERROR: wrong # args: should be "v3-minimum-std test default_std max_std"
> +ERROR: wrong # args: should be "v3-minimum-std test default_std max_std"
> +ERROR: wrong # args: should be "v3-minimum-std test default_std max_std"
So even though inside v3-minimum-std you changed to use the globals,
you didn't change the arguments of the proc:
proc v3-minimum-std { test default_std max_std } {
So when you changed the code to call it to use only one:
- set min_std [v3-minimum-std $test $default_std $max_std]
- if { $min_std > $default_std } {
+ set min_std [v3-minimum-std $test]
We get an error.
Thanks,
Andrew Pinski
>
> Thanks,
> Andrew Pinski
>
> >
> > libstdc++-v3/ChangeLog:
> >
> > * testsuite/lib/libstdc++.exp (v3_default_std, v3_max_std): New
> > global variables.
> > (v3-minimum-std): Use globals instead of arguments.
> > (v3_modules_std): Define in terms of $v3_max_std.
> > (v3-dg-runtest): Use globals instead of local variables. Adjust
> > call to v3-min-std.
> > ---
> >
> > Tested x86_64-linux.
> >
> > libstdc++-v3/testsuite/lib/libstdc++.exp | 27 ++++++++++++++----------
> > 1 file changed, 16 insertions(+), 11 deletions(-)
> >
> > diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp
> > b/libstdc++-v3/testsuite/lib/libstdc++.exp
> > index 5b50972511f3..d2d61a9bed9c 100644
> > --- a/libstdc++-v3/testsuite/lib/libstdc++.exp
> > +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
> > @@ -473,9 +473,16 @@ if { [info procs saved-dg-test] == [list] } {
> > }
> > }
> >
> > +# These should be adjusted whenever the compiler's default -std is updated
> > +# or a newer C++ effective target is added.
> > +set v3_default_std 20
> > +set v3_max_std 26
> > +
> > # Find the minimum standard required by a test, if higher than the
> > default_std.
> > proc v3-minimum-std { test default_std max_std } {
> > - for {set s $default_std} {$s <= $max_std} {incr s 3} {
> > + global v3_default_std
> > + global v3_max_std
> > + for {set s $default_std} {$s <= $v3_max_std} {incr s 3} {
> > if [search_for $test "\{ dg-do * \{ target c++$s"] {
> > return $s
> > } elseif [search_for $test "\{ dg-require-effective-target c++$s"] {
> > @@ -496,13 +503,15 @@ if [info exists env(GLIBCXX_TESTSUITE_STDS)] {
> >
> > # Allow adjusting which -std we test with -fmodules.
> > if ![info exists v3_modules_std] {
> > - set v3_modules_std "26"
> > + set v3_modules_std "$v3_max_std"
> > }
> >
> > # Modified dg-runtest that runs tests in multiple standard modes,
> > # unless they specifically specify one standard.
> > proc v3-dg-runtest { testcases flags default-extra-flags } {
> > global runtests
> > + global v3_default_std
> > + global v3_max_std
> > global v3_modules_std
> >
> > foreach test $testcases {
> > @@ -529,22 +538,18 @@ proc v3-dg-runtest { testcases flags
> > default-extra-flags } {
> > # If the test requires a newer C++ version than which
> > # is tested by default, use that C++ version for that
> > # single test.
> > - # These should be adjusted whenever the default -std is
> > - # updated or newer C++ effective target is added.
> > - set default_std 20
> > - set max_std 26
> > - set min_std [v3-minimum-std $test $default_std $max_std]
> > - if { $min_std > $default_std } {
> > + set min_std [v3-minimum-std $test]
> > + if { $min_std > $v3_default_std } {
> > set std_list $min_std
> > - if { $min_std != $max_std } {
> > + if { $min_std != $v3_max_std } {
> > # Also test the latest version.
> > - lappend std_list "$max_std"
> > + lappend std_list "$v3_max_std"
> > }
> > } else {
> > # Only run each test once with the default -std option.
> > # This avoids increasing the run time for most testers.
> > # Libstdc++ developers can override this with
> > v3_std_list.
> > - set std_list $default_std
> > + set std_list $v3_default_std
> > }
> > }
> > set option_list { }
> > --
> > 2.53.0
> >