public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/35164] [4.3 regression] Unable to coalesce ab SSA_NAMEs
Date: Tue, 12 Feb 2008 22:46:00 -0000	[thread overview]
Message-ID: <20080212224545.6050.qmail@sourceware.org> (raw)
In-Reply-To: <bug-35164-87@http.gcc.gnu.org/bugzilla/>



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-02-12 22:45 -------
Reduced testcase without include:

typedef unsigned int size_t;
template<typename _Iterator, typename _Container> class __normal_iterator {
public:
  const _Iterator& base() const;
};
template<typename _BI1, typename _BI2> inline
void copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) {
  while (__first != __last) *--__result = *--__last;
}
template<typename _Tp> struct _Vector_base {
  struct _Vector_impl { _Tp* _M_finish; };
  _Vector_impl _M_impl;
};
template<typename _Tp > class vector : protected _Vector_base<_Tp> {
  typedef vector<_Tp> vector_type;
  typedef _Tp * pointer;
  typedef _Tp & reference;
  typedef __normal_iterator<pointer, vector_type> iterator;
  typedef size_t size_type;
public:
  iterator end();
  void resize(size_type __new_size) { insert(end(), __new_size); }
  reference operator[](size_type __n);
  void insert(iterator __position, size_type __n)
  {
    pointer __old_finish(this->_M_impl._M_finish);
    copy_backward(__position.base(), __old_finish - __n, __old_finish);
  }
};
struct A {
  virtual ~A ();
  void incRef ();
  void decRef ();
};
struct C : public A {
  static C *alloc ();
};
template <class T> struct B {
  B () : ptr (T::alloc ()) { }
  B (T *a_ptr) : ptr (a_ptr) { }
  ~B () { decRef (); }
  B& operator= (const B<T>& a) { if (a.get () != this->get ()) { decRef ();
incRef (); } }
  template<class U> operator B<U> () const { return B<U> (ptr); }
  T* operator-> () const { }
  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 <class T> inline void foo (const B<T> & x) { d.resize (1); d[0] = x;
}
  vector<B <C> > d;
};
struct E : public C {
  static E *alloc ();
};
struct F : public D {
  static F *alloc ();
};
void foo (vector<B<D> > & x) {
  for (int i = 0; i < 2; ++i)
    {
      B<F> l;
      B<E> m;
      l->foo (m);
    }
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-02-12 22:45:45
               date|                            |


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


  parent reply	other threads:[~2008-02-12 22:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 12:19 [Bug tree-optimization/35164] New: " jakub at gcc dot gnu dot org
2008-02-11 12:20 ` [Bug tree-optimization/35164] " jakub at gcc dot gnu dot org
2008-02-12 12:01 ` jakub at gcc dot gnu dot org
2008-02-12 22:04 ` rguenth at gcc dot gnu dot org
2008-02-12 22:46 ` rguenth at gcc dot gnu dot org [this message]
2008-02-13  4:06 ` rakdver at kam dot mff dot cuni dot cz
2008-02-13  4:07 ` rakdver at gcc dot gnu dot org
2008-02-15  2:59 ` rakdver at gcc dot gnu dot org
2008-02-15  9:24 ` rguenth at gcc dot gnu dot org
2008-02-15  9:24 ` rguenth at gcc dot gnu dot org
2008-02-15 12:37 ` rguenth at gcc dot gnu dot org
2008-02-15 12:37 ` rguenth at gcc dot gnu dot org
2008-02-15 14:06 ` rakdver at kam dot mff dot cuni dot cz
2008-02-15 14:13 ` rguenther at suse dot de
2008-02-15 15:25 ` rguenth at gcc dot gnu dot org
2008-02-15 15:26 ` rguenth at gcc dot gnu dot org
     [not found] <bug-35164-4@http.gcc.gnu.org/bugzilla/>
2020-07-28  5:54 ` rguenth at gcc dot gnu.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=20080212224545.6050.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).