This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/14863] [3.4 regression] unit-at-a-time causes miscompilation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]