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 c++/29809] Segmentation fault with 4.1.1 and 4.1-20061110



------- Comment #3 from rguenth at gcc dot gnu dot org  2006-11-12 14:18 -------
Confirmed.  Reduced testcase that fails with -O -finline-functions:

class QDate {  };
class QTime {
public:
  bool operator>( const QTime &d ) const { return ds > d.ds; }
  unsigned ds;
};
class QDateTime {
public:
  QDateTime( const QDate &, const QTime & );
  QDate date() const { return d; }
  QTime time() const { return t; }
  QDateTime addDays( int days ) const;
  QDate d;
  QTime t;
};
class TimerTable;
class TimerTableItem {
  void setTable(QDateTime start,QTime stop);
  QDateTime start_time;
  QTime stop_time;
  QDateTime stop_datetime;
  TimerTable *timer_window;
};
class TimerTable
{
public:
  QDateTime calc_stopDateTime(QDateTime start_datetime,QTime stop_time);
};
void TimerTableItem::setTable(QDateTime start,QTime stop)
{
  stop_datetime=timer_window->calc_stopDateTime(start_time,stop_time);
}
QDateTime TimerTable::calc_stopDateTime(QDateTime start_datetime,QTime
stop_time)
{
  QTime start_time=start_datetime.time();
  QDate start_date=start_datetime.date();
  QDateTime stop_datetime(start_date,stop_time);
  if(start_time > stop_time )
    stop_datetime=stop_datetime.addDays(1);
  return stop_datetime;
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |4.1.2
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-12 14:18:21
               date|                            |


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


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