From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30414 invoked by alias); 11 Feb 2008 12:19:57 -0000 Received: (qmail 30274 invoked by uid 48); 11 Feb 2008 12:19:10 -0000 Date: Mon, 11 Feb 2008 12:19:00 -0000 Subject: [Bug tree-optimization/35164] New: [4.3 regression] Unable to coalesce ab SSA_NAMEs X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg01169.txt.bz2 On x86_64 with -O2 the following testcase ICEs with: D.11907_556(ab) and D.11907_14(ab) rh432296.C: In function `void foo(std::vector, std::allocator > >&)': rh432296.C:52: internal compiler error: SSA corruption Please submit a full bug report, with preprocessed source if appropriate. See for instructions. That looks similar to the inlining AB problem Jan fixed, but this is with current trunk. Sorry for the left-over #include , didn't get to minimize this more yet. #include struct A { A (); virtual ~A (); inline void incRef (); inline void decRef (); virtual void free () {} int m_refCount; }; void A::incRef () { m_refCount++; } void A::decRef () { if (!m_refCount) { free (); return; } m_refCount--; } template struct B; struct C : public A { static C *alloc (); }; template struct B { typedef T DataT; B () : ptr (T::alloc ()) { } B (const B& a) : ptr (a.get ()) { incRef (); } B (T *a_ptr) : ptr (a_ptr) { incRef (); } ~B () { decRef (); } B& operator= (const B& a) { if (a.get () != this->get ()) { decRef (); ptr = a.get (); incRef (); } return *this; } template operator B () const { return B (ptr); } template operator B () const { return B (ptr); } T* operator-> () const { return ptr; } T* get () const { return ptr; } void decRef () const { if (ptr != 0) ptr->decRef (); } void incRef () const { if (ptr != 0) ptr->incRef (); } T *ptr; }; struct D : public C { template inline void foo (const B & x) { d.resize (1); d[0] = x; } std::vector > d; }; struct E : public C { static E *alloc (); }; struct F : public D { static F *alloc (); }; void foo (std::vector > & x) { for (int i = 0; i < 2; ++i) { B l; B m; l->foo (m); x.push_back (l); } } -- Summary: [4.3 regression] Unable to coalesce ab SSA_NAMEs Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35164