https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65764
Bug ID: 65764
Summary: internal compiler error: in retrieve_specialization,
at cp/pt.c:1048
Product: gcc
Version: 4.9.3
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: galbramc at mit dot edu
Created attachment 35313
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35313&action=edit
Output from g++ -v -save-temps -std=c++11 test_bug.cpp
Compiling
class U1 {};
class U2 {};
class T1 {};
class T2 {};
template<class X1, class X2, class X3>
class A;
template<class X1>
class A<X1, T1, T2>
{
};
template<class X1, class X2>
class B
{
template<class tmpX1>
using AA = A<tmpX1, T1, T2>;
};
template<class BB>
class C
{
template<class tmpX1>
using AA = typename BB::template AA<tmpX1>;
};
int main()
{
C< B<U1,U2> > c;
}
Results in the error:
test_bug.cpp: In substitution of ‘template<class tmpX1> using AA = A<X1, T1,
T2> [with tmpX1 = U1]’:
test_bug.cpp:27:45: required from ‘class C<B<U1, U2> >’
test_bug.cpp:32:17: required from here
test_bug.cpp:20:30: internal compiler error: in retrieve_specialization, at
cp/pt.c:1048
using AA = A<tmpX1, T1, T2>;
I have attached the complete output using -v -save-temps.
This bug is in gcc-4_9-branch of the repository, but appears to have been fixed
in gcc-5-branch. I don't know if there are any plans to port the fixes back to
4.8 or 4.9. We use Ubuntu 14.04 (where 4.8 is currently the standard), and were
hoping not to have to ask developers to use 5.0 for the software development.