public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/22147] New: [4.1 regression] ICE in get_bindings
@ 2005-06-22 18:14 pinskia at gcc dot gnu dot org
  2005-06-22 18:15 ` [Bug c++/22147] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-22 18:14 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-09-27 23:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-22 18:14 [Bug c++/22147] New: [4.1 regression] ICE in get_bindings pinskia at gcc dot gnu dot org
2005-06-22 18:15 ` [Bug c++/22147] " pinskia at gcc dot gnu dot org
2005-06-22 21:42 ` reichelt at gcc dot gnu dot org
2005-06-23  2:45 ` bangerth at dealii dot org
2005-08-02 23:51 ` pinskia at gcc dot gnu dot org
2005-09-08 23:43 ` janis at gcc dot gnu dot org
2005-09-09  0:10 ` bangerth at dealii dot org
2005-09-09  8:21 ` rguenth at gcc dot gnu dot org
2005-09-09  9:25 ` rguenth at gcc dot gnu dot org
2005-09-09  9:42 ` rguenth at gcc dot gnu dot org
2005-09-27 22:01 ` mmitchel at gcc dot gnu dot org
2005-09-27 23:34 ` cvs-commit at gcc dot gnu dot org
2005-09-27 23:35 ` mmitchel at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).