This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17400] [4.0 Regression] out of SSA corruption
- From: "belyshev at lubercy dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2004 18:19:20 -0000
- Subject: [Bug tree-optimization/17400] [4.0 Regression] out of SSA corruption
- References: <20040910153536.17400.steven@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From belyshev at lubercy dot com 2004-09-10 18:19 -------
// small testcase, use '-O1':
void inc (int &);
bool dec_test (int &);
struct A
{
int c;
friend void AddRef (A * p)
{
inc (p->c);
}
friend void Release (A * p)
{
if(dec_test (p->c))
delete p;
}
};
struct B
{
B (A *p) : obj(p)
{
AddRef (obj);
}
~B()
{
Release (obj);
}
void swap (B &rhs)
{
A * tmp = obj;
obj = rhs.obj;
rhs.obj = tmp;
}
A *obj;
};
void bar (A *p1, A* p2)
{
B px (p1);
B px2 (p2);
px.swap (px2);
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-09-10 18:19:19
date| |
Summary|out of SSA corruption |[4.0 Regression] out of SSA
| |corruption
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17400