On Tue, Feb 17, 2026 at 11:53 AM Jonathan Wakely <[email protected]> wrote:

> On Tue, 17 Feb 2026 at 10:50, Jonathan Wakely <[email protected]> wrote:
> >
> > On Tue, 17 Feb 2026 at 09:44, Tomasz Kaminski <[email protected]>
> wrote:
> > >
> > >
> > >
> > > On Tue, Feb 17, 2026 at 8:48 AM Jakub Jelinek <[email protected]>
> wrote:
> > >>
> > >> On Mon, Feb 16, 2026 at 01:34:50PM +0100, Tomasz Kamiński wrote:
> > >> > This patch implements LWG 4491, addressing C++26 NB comments.
> > >> >
> > >> > libstdc++-v3/ChangeLog:
> > >> >
> > >> >       * include/std/mdspan (std::submdspan_extents): Rename to...
> > >> >       (std::subextents): Rename of submdspan_extents.
> > >> >       (std::submdspan_canonicalize_slices): Rename to...
> > >> >       (std::canonical_slices):
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/submdspan_canonicalize_slices.cc:
> > >> >       Move to...
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/canonical_slices.cc: ...here.
> > >> >       Updated calls to submdspan_canonicalize_slices.
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/submdspan_canonicalize_slices_neg.cc:
> > >> >       Move to...
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/canonical_slices_neg.cc: ...here.
> > >> >       Updated calls to submdspan_canonicalize_slices.
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/submdspan_extents.cc: Move to...
> > >> >       * testsuite/23_containers/mdspan/submdspan/subextents.cc:
> ...here.
> > >> >       Qualified and renamed calls to submdspan_extents.
> > >> >       *
> testsuite/23_containers/mdspan/submdspan/submdspan_extents_neg.cc: Move
> to...
> > >> >       * testsuite/23_containers/mdspan/submdspan/subextents_neg.cc:
> ...here.
> > >> >       Qualified and renamed calls to submdspan_extents.
> > >>
> > >> This broke
> > >> +FAIL: g++.dg/modules/compile-std1.C -std=c++26 (test for excess
> errors)
> > >> +FAIL: g++.dg/modules/compile-std1.C module-cmi std
> (gcm.cache/std.gcm)
> > >> +FAIL: g++.dg/modules/compile-std1.C module-cmi std.compat
> (gcm.cache/std.compat.gcm)
> > >> on all targets.
> > >>
> > >> The following patch fixes it, tested on x86_64-linux, ok for trunk?
> > >
> > > Thank you for fixing that, I have forgotten about modules again. Hope
> we will get some
> > > module tests included in libstdc++ testsuite.
> >
> > This might be good enough for now:
> >
> > commit b22201c190b223aacd13e9db66aa08074940e8a4 (HEAD -> master)
> > Author:     Jonathan Wakely <[email protected]>
> > AuthorDate: Tue Feb 17 10:49:10 2026
> > Commit:     Jonathan Wakely <[email protected]>
> > CommitDate: Tue Feb 17 10:49:10 2026
> >
> >    libstdc++: Add smoke test for std module
> >
> >    libstdc++-v3/ChangeLog:
> >
> >            * testsuite/Makefile.am (check-am): Run abi.exp tests with
> >            GLIBCXX_TESTSUITE_STDS=modules in the environment.
> >            * testsuite/Makefile.in: Regenerate.
> >
> > diff --git a/libstdc++-v3/testsuite/Makefile.am
> > b/libstdc++-v3/testsuite/Makefile.am
> > index 64086ef31acd..a03ad25f09b9 100644
> > --- a/libstdc++-v3/testsuite/Makefile.am
> > +++ b/libstdc++-v3/testsuite/Makefile.am
> > @@ -155,6 +155,8 @@ check-DEJAGNU $(check_DEJAGNU_normal_targets):
> > check-DEJAGNU%: site.exp
> >        fi
> >
> > check-am:
> > +       GLIBCXX_TESTSUITE_STDS=modules DEJAGNU=/dev/null \
> > +         runtest --tool libstdc++ --target_board=unix abi.exp
> >        $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
>
> What this does is run the abi.exp tests with 'modules' in the STDS
> list, which triggers the code in lib/libstdc++.exp that compiles the
> std.cc and std.compat.cc modules. If there are errors in those files,
> it will fail.
>
Add this to the commit description and we are good.

>
> The abi.exp testsuite is very quick, so using that has very little
> overhead. A cleaner way to do it would be to add a new
> testsuite/libstdc++-modules/std-module.exp file which explicitly sets
> v3-std-list before running the build-v3-support procedure, and then
> just exits.
>
I hope in the future we get the option to run existing tests with modules,
so
we can also capture missing exports, so the above seems like a good fix for
now.

>

Reply via email to