https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120412
Nathaniel Shead <nshead at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Ever confirmed|0 |1
Last reconfirmed| |2025-05-23
CC| |nshead at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Blocks| |103524
--- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
Confirmed. Looks like I forgot to put in handling for TU-local values on
re-export for partitions.
(In reply to Cameron Angus from comment #0)
> This may be doing something ill-advised, I believe there are some potential
> issues with lambda type linkage, but anyway it obviously shouldn't be
> crashing the compiler.
And yes, agreed. FWIW with '-Wextra', writing 'm-part.mxx' should get you the
following warning:
a.cpp:14:10: warning: ‘template<class T> auto kdeps::fun2(T&&)’ refers to
TU-local entity ‘auto kdeps::fun1(F) [with F = <lambda()>]’ and cannot be
instantiated in other TUs [-Wtemplate-names-tu-local]
14 | auto fun2(T&&)
| ^~~~
a.cpp:6:10: note: ‘auto kdeps::fun1(F) [with F = <lambda()>]’ has TU-local
template argument ‘kdeps::<lambda()>’
6 | auto fun1(F)
| ^~~~
a.cpp:11:29: note: ‘kdeps::<lambda()>’ has no name and cannot be differentiated
from similar lambdas in other TUs
11 | using Dodgy = decltype([] {});
| ^
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103524
[Bug 103524] [meta-bug] modules issue