https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87536
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Seems to be fixed on trunk:
87536.cc:2:13: error: 'X' was not declared in this scope
2 | concept X = X<T>;
| ^
87536.cc:2:16: error: expected primary-expression before '>' token
2 | concept X = X<T>;
| ^
87536.cc:2:17: error: expected primary-expression before ';' token
2 | concept X = X<T>;
| ^
87536.cc:5:6: error: template constraint failure for 'template<class> requires
X< <template-parameter-1-1> > struct A'
5 | A<int> a;
| ^
87536.cc:5:6: note: constraints not satisfied