This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47336] New: ICE: "Error reporting routines re-entered"
- From: "zeratul976 at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 17 Jan 2011 21:35:58 +0000
- Subject: [Bug c++/47336] New: ICE: "Error reporting routines re-entered"
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47336
Summary: ICE: "Error reporting routines re-entered"
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zeratul976@hotmail.com
For the following code:
struct A
{
template <typename T>
struct B
{
};
template <typename T>
B<T> f(T t)
{
return B<T>();
}
};
template <typename T>
auto g(T t) -> decltype(A().f(t))
{
return A().f(t);
}
template <typename S>
class C
{
struct D
{
};
D d;
public:
decltype(g(d)) h()
{
return g(d);
}
};
void g()
{
C<int> c;
c.h();
}
Both gcc 4.5 and 4.6 give the following error:
test.cpp: In instantiation of âdecltype (A().A::B<T> A::f(t))
g(T) [with T = C<int>::D, decltype (A().A::f(t)) = A::B<C<int>::D>]â:
Internal compiler error: Error reporting routines re-entered.
As far as I can tell, this is valid C++0x code.