Thanks for the report. This should be fixed on trunk
by r16-5666-g2c1e896ac97065.
    libstdc++: Fix exposure of TU-local lambda in __detail::__func_handle_t.

    The lambda is considered to be TU-local entity, use a named function
    instead.

    As drive-by, a functor stored inside __func_handle::_Inplace is renamed
    to _M_fn, as we no longer limit the functor type to function pointers.

    libstdc++-v3/ChangeLog:

            * include/std/ranges (__func_handle::__select): Named function
            extracted from local lambda.
            (__detail::__func_handle_t): Define using
__func_handle::__select.
            (__func_handle::_Inplace): Raname _M_ptr to _M_fn.

    Reviewed-by: Jonathan Wakely <[email protected]>
    Signed-off-by: Tomasz Kamiński <[email protected]>


On Wed, Nov 26, 2025 at 6:53 PM Haochen Jiang <[email protected]>
wrote:

> On Linux/x86_64,
>
> 9ed821d107f7a183f75b4b5d25b32d7f34ca60b5 is the first bad commit
> commit 9ed821d107f7a183f75b4b5d25b32d7f34ca60b5
> Author: Tomasz Kamiński <[email protected]>
> Date:   Thu Nov 13 14:54:11 2025 +0100
>
>     libstdc++: Optimize functor storage for transform views iterators.
>
> caused
>
> FAIL: g++.dg/modules/xtreme-header-8.C module-cmi xstd (gcm.cache/xstd.gcm)
> FAIL: g++.dg/modules/xtreme-header-8.C -std=c++26 (test for excess errors)
>
> with GCC configured with
>
> ../../gcc/configure
> --prefix=/export/users3/haochenj/src/gcc-bisect/master/master/r16-5625/usr
> --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld
> --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet
> --without-isl --enable-libmpx x86_64-linux --disable-bootstrap
>
> To reproduce:
>
> $ cd {build_dir}/gcc && make check
> RUNTESTFLAGS="modules.exp=g++.dg/modules/xtreme-header-8.C
> --target_board='unix{-m32}'"
> $ cd {build_dir}/gcc && make check
> RUNTESTFLAGS="modules.exp=g++.dg/modules/xtreme-header-8.C
> --target_board='unix{-m32\ -march=cascadelake}'"
> $ cd {build_dir}/gcc && make check
> RUNTESTFLAGS="modules.exp=g++.dg/modules/xtreme-header-8.C
> --target_board='unix{-m64}'"
> $ cd {build_dir}/gcc && make check
> RUNTESTFLAGS="modules.exp=g++.dg/modules/xtreme-header-8.C
> --target_board='unix{-m64\ -march=cascadelake}'"
>
> (Please directly reply to this email for question about this report.)
> (If you met problems with cascadelake related, disabling AVX512F in
> command line might save that.)
> (However, please make sure that there is no potential problems with
> AVX512.)
>
>

Reply via email to