This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/23651] [4.1 Regression] ICE in GC
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2005 13:28:54 -0000
- Subject: [Bug middle-end/23651] [4.1 Regression] ICE in GC
- References: <20050831094226.23651.snyder@fnal.gov>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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<Strptrmap*> (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