This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22147] New: [4.1 regression] ICE in get_bindings
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2005 18:14:09 -0000
- Subject: [Bug c++/22147] New: [4.1 regression] ICE in get_bindings
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code ICEs:
// Line 1
class A {
public:
A() { };
~A() { };
};
class B {
public:
B();
B(const A& a) { };
~B();
};
template <typename X> class T;
template <typename X, typename Y>
T<X>* func(T<Y>* p);
template <typename X> class T {
X* m_;
public:
T(X* x) : m_(x) { };
~T() { };
friend T<class Y>* func<Y, X>(T<X>* p);
};
template <typename X, typename Y>
T<X>* func(T<Y>* p) {
return (new T<X>(new X(*p->m_)));
}
int main() {
A* a = new A();
T<A>* p = new T<A>(a);
T<B>* q = func<B, A>(p);
return 0;
}
--
Summary: [4.1 regression] ICE in get_bindings
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22147