https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118060
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Ever confirmed|0 |1 Last reconfirmed| |2024-12-16 Status|UNCONFIRMED |NEW Blocks| |67491 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. Reduced down to: ``` template<typename T> T *begin(T *a); template<typename T, typename T1> concept c = false; template<typename T> struct S { S() = default; // may remove, still internal error template<typename U> requires requires (U u){ {*(begin(u))} -> c<T>; } S(const U& u) : S(){} }; int main() { S s2{0}; return 0; } ``` I have not tried adding a deduction guide for S to see if we can make this valid code though. Supplying a template argument to S allows the code to work correctly. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 [Bug 67491] [meta-bug] concepts issues