This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/24852] New: [4.0 regression] Segmentation fault (infinite recursion in cgraph_clone_inlined_nodes)


// 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 ()
{
}


-- 
           Summary: [4.0 regression] Segmentation fault (infinite recursion
                    in cgraph_clone_inlined_nodes)
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: belyshev at depni dot sinp dot msu dot ru


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24852


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]