https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103572
Bug ID: 103572 Summary: [11/12 Regression] ICE in build_function_type after undefined type as a template argument during class template argument deduction Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: error-recovery, ice-on-invalid-code Severity: trivial Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Reduced testcase: template <view_concept urng_t> class view { view(view const & rhs) = default; }; view v1(0); ---- CUT ---- GCC 10 did not ICE: <source>:1:11: error: 'view_concept' has not been declared 1 | template <view_concept urng_t> | ^~~~~~~~~~~~ <source>:6:10: error: class template argument deduction failed: 6 | view v1(0); | ^ <source>:6:10: error: no matching function for call to 'view(int)' <source>:4:3: note: candidate: 'template<<declaration error> > view(const view<<declaration error> >&)-> view<<declaration error> >' 4 | view(view const & rhs) = default; | ^~~~ <source>:4:3: note: template argument deduction/substitution failed: <source>:2:7: note: candidate: 'template<<declaration error> > view(view<<declaration error> >)-> view<<declaration error> >' 2 | class view | ^~~~ <source>:2:7: note: template argument deduction/substitution failed: