public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/23651] [4.1 Regression] ICE in GC
Date: Wed, 31 Aug 2005 13:36:00 -0000	[thread overview]
Message-ID: <20050831132854.28822.qmail@sourceware.org> (raw)
In-Reply-To: <20050831094226.23651.snyder@fnal.gov>


------- 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


  parent reply	other threads:[~2005-08-31 13:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-31  9:44 [Bug c++/23651] New: " snyder at fnal dot gov
2005-08-31 10:06 ` [Bug c++/23651] " snyder at fnal dot gov
2005-08-31 12:02 ` pinskia at gcc dot gnu dot org
2005-08-31 12:25 ` pinskia at gcc dot gnu dot org
2005-08-31 13:36 ` pinskia at gcc dot gnu dot org [this message]
2005-08-31 16:00 ` [Bug middle-end/23651] [4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-16 19:59 ` pinskia at gcc dot gnu dot org
2005-09-16 22:58 ` [Bug c++/23651] " pinskia at gcc dot gnu dot org
     [not found] <bug-23651-702@http.gcc.gnu.org/bugzilla/>
2005-10-06  1:21 ` [Bug middle-end/23651] " pinskia at gcc dot gnu dot org
2005-10-06  1:28 ` pinskia at gcc dot gnu dot org
2005-10-06 15:06 ` pinskia at gcc dot gnu dot org
2005-10-06 22:14 ` pinskia at gcc dot gnu dot org
2005-10-06 22:14 ` cvs-commit at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050831132854.28822.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).