https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121822
Bug ID: 121822 Summary: ICE in dependent_type_p with concept Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: stevenxia990430 at gmail dot com Target Milestone: --- The following program successfully compiles on Clang but reports an internal compiler error: Segmentation fault. Failed on gcc-trunk. To quickly reproduce: https://gcc.godbolt.org/z/qf67vTzzM ``` #include <concepts> template<typename T> concept Derived = requires {typename T::derived_type; }; // Primary template: no constraints template<typename T, typename = std::void_t<>> struct Wrapper { }; template<typename T> struct Wrapper<T, std::void_t<decltype(static_cast<void>(Derived<T>))>> { }; int main() { return 0; } ``` After removing the `static_cast<void>` the program can successfully compile