From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28889 invoked by alias); 31 Aug 2005 13:29:02 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28823 invoked by uid 48); 31 Aug 2005 13:28:54 -0000 Date: Wed, 31 Aug 2005 13:36:00 -0000 Message-ID: <20050831132854.28822.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050831094226.23651.snyder@fnal.gov> References: <20050831094226.23651.snyder@fnal.gov> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/23651] [4.1 Regression] ICE in GC X-Bugzilla-Reason: CC X-SW-Source: 2005-08/txt/msg03582.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-31 13:28 ------- Confirmed, reduced testcase: namespace std { struct allocator { ~allocator() throw(){} }; struct string { struct _Alloc_hider : allocator {}; _Alloc_hider _M_dataplus; string(); string(const char* __s, const allocator& __a = allocator()); }; } struct Strptrmap { bool insert (const std::string& key, unsigned val){} }; struct Indptr_Base { virtual ~Indptr_Base (); void decref (); unsigned short _refcount; }; inline void Indptr_Base::decref () { if (_refcount == 2) delete this; else _refcount -= 2; } struct d0_Ref_Base { ~d0_Ref_Base (); bool is_null() const; void* ptr1 () const; mutable const void* _ptr; Indptr_Base* _indptr; Strptrmap* operator->() const; }; inline d0_Ref_Base::~d0_Ref_Base () { if (_indptr) _indptr->decref (); } inline bool d0_Ref_Base::is_null () const { return (_ptr == 0 && _indptr == 0); } inline Strptrmap* d0_Ref_Base::operator->() const { if (is_null()) return 0; return reinterpret_cast (ptr1 ()); } int foo () { std::string fname; d0_Ref_Base hm1; for (int i = 0; i < 10; i++) hm1->insert ("", 0); hm1->insert ("", 0); return 0; } --- It worked with 20050823. Note my reduced testcase is from powerpc-darwin. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|c++ |middle-end Ever Confirmed| |1 GCC build triplet|i686-pc-linux-gnu | GCC host triplet|i686-pc-linux-gnu | GCC target triplet|i686-pc-linux-gnu | Last reconfirmed|0000-00-00 00:00:00 |2005-08-31 13:28:51 date| | Summary|ICE in GC |[4.1 Regression] ICE in GC Target Milestone|--- |4.1.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23651