https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104836
Bug ID: 104836
Summary: ice in unify, at cp/pt.cc:24055
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 52580
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52580&action=edit
C++ source code
For the attached C++ code, recent gcc trunk does this:
bug796.cc: In substitution of ‘template<Ts ...Ns, int (* ...Ps)[3]> A<int [3],
i
nt, int, short int>::A(X<Ps ...>, Ts (*)[Ns]...) [with Ts ...Ns = <missing>;
int
(* ...Ps)[3] = {(& arr1), (& arr2)}]’:
bug796.cc:12:43: required from here
bug796.cc:12:43: internal compiler error: in unify, at cp/pt.cc:24055
12 | A a(X<&arr1, &arr2>{}, &arr1, &arr2, &arr3);
| ^
0x9432e3 unify(tree_node*, tree_node*, tree_node*, tree_node*, int, bool)
../../trunk.git/gcc/cp/pt.cc:24055
This code is a copy of a file from the clang test suite, file
SemaTemplate/deduction-guide.cpp.