https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120644

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I have tried to reproduce this with a.h
struct A {};
enum E { E0, E1 };
template <typename T>
struct B {};
template <typename T>
constexpr auto format_kind = []{ static_assert (false); return E1; };
template <typename _Tp>
inline constexpr bool is_pointer_v = __is_pointer (_Tp);
template<typename _Tp>
concept pointer = is_pointer_v<_Tp>;
template <typename T>
consteval E foo () { return E1; }
template <pointer T>
constexpr E format_kind<T> = foo <T> ();
template <typename T>
constexpr auto format_kind<B<T>> = E0;
and a.H
#include "a.h"
and a.C
#include "a.h"
import "a.H";
./xg++ -B ./ -S -fmodule-header a.H -std=c++26
./xg++ -B ./ -S a.C -std=c++26 -fmodules
but that doesn't reproduce it.  Sure, format_kind in <format> is more complex
than that.

Reply via email to