Bug 24852 - [4.0 regression] Segmentation fault (infinite recursion in cgraph_clone_inlined_nodes)
Summary: [4.0 regression] Segmentation fault (infinite recursion in cgraph_clone_inlin...
Status: RESOLVED DUPLICATE of bug 22252
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-11-14 16:02 UTC by Serge Belyshev
Modified: 2005-11-14 16:04 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Serge Belyshev 2005-11-14 16:02:52 UTC
// compile this with -O3 to get segfault on 4.0.3,
// note the "warning: inline function 'A::~A()' used but never defined".
// 3.3 and 4.1 accept this code without warning.
// This bug was originally reported by Alexey Maximov <amax@mail.ru>

struct A;

template<class T>
struct P
{
  P() : p(0) { }
  ~P();
  T *p;
};

template<class T>
P<T>::~P()
{
  delete p;
}

struct Q : private P<A>
{
};

struct V
{
  virtual ~V();
};

#pragma interface

struct A
{
  V d;
  Q p;
};

struct T
{
  T ();
  Q q;
};

T::T ()
{
}
Comment 1 Andrew Pinski 2005-11-14 16:04:49 UTC
This is a dup of bug 24248 which in turn is a dup of bug 22252.

*** This bug has been marked as a duplicate of 22252 ***