https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96111
Bug ID: 96111 Summary: checking type of attribute with concepts results in compilation error or ICE Product: gcc Version: 10.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: lts-rudolph at gmx dot de Target Milestone: --- Code fails to compile with gcc 10.1.1 ( unexpected compile error messages ) and compilation fails with ICE on current trunk if checking in the requirement with only the commented lines, everything works fine. compiled with: g++ --std=c++20 main.cpp -O2 -g struct N { char value; auto Get() { return value; } }; struct M { int value; auto Get() { return value; } }; void func3( auto n ) requires requires { //{ n.Get() } -> std::same_as<int>; { n.value } -> std::same_as<int>; } { std::cout << __PRETTY_FUNCTION__ << std::endl; } void func3( auto n ) requires requires { //{ n.Get() } -> std::same_as<char>; { n.value } -> std::same_as<char>; } { std::cout << __PRETTY_FUNCTION__ << std::endl; } int main() { func3( n ); func3( m ); }