This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/14863] [3.4 regression] unit-at-a-time causes miscompilation
- 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: 2 Jun 2004 00:19:31 -0000
- Subject: [Bug rtl-optimization/14863] [3.4 regression] unit-at-a-time causes miscompilation
- References: <20040406114325.14863.rguenth@tat.physik.uni-tuebingen.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-02 00:19 -------
Confirmed and here is a test which can go into the testsuite and is slightly smaller:
extern "C" void abort();
struct DomainBase { ~DomainBase() {} };
struct Interval :public DomainBase {
Interval () {}
Interval (const Interval &a) {}
};
struct IntervalIterator
{
IntervalIterator()
{ val_m = 1; }
const int & operator*() const
{ return val_m; }
IntervalIterator & operator--()
{
val_m -= 1;
return *this;
}
Interval abrakadabra;
int val_m;
};
struct reverse_iterator {
const int &operator*() const
{
IntervalIterator tmp = current;
return *--tmp;
}
IntervalIterator current;
};
int main ()
{
reverse_iterator rk_pos;
if (*rk_pos)
abort();
if (*rk_pos)
abort();
if (*rk_pos)
abort();
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to work|3.3.3 |3.3.3 3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-06-02 00:19:23
date| |
Summary|[3.4/3.5 regression] unit- |[3.4 regression] unit-at-a-
|at-a-time causes |time causes miscompilation
|miscompilation |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14863