This code makes clang++ to crash:
template <typename>
struct S {
static constexpr char c{};
static constexpr decltype(&c) p = nullptr;
};
auto f() {
return S<int>::p;
}
GCC and MSVC have no issue to compile the code.
https://godbolt.org/z/edr4h4v99
If instead of being deduced, the type of S::p or the return type of f is explicitly given (const char*), then compilation succeeds.