http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56462
Bug #: 56462
Summary: Simple use of auto in template function causes
internal error in type_unification_real
Classification: Unclassified
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Here is a complete source file which causes the error
*********************************************
template <typename F>
void foo (F & f)
{
auto f_copy = *f;
}
*********************************************
Compiling this on ubuntu 12.04 with
g++ test.cpp -std=c++0x
yields the following error
test.cpp: In function ‘void foo(F&)’:
test.cpp:4:17: internal compiler error: in type_unification_real, at
cp/pt.c:13573