3 // { dg-options "-O2 -mcpu=v8 -fPIC" { target { { sparc*-*-* } && { ilp32 && fpic } } } }
10 explicit QTime(int ms = 0) : ds(ms) {}
11 static QTime currentTime() { return QTime(); }
12 QTime addMSecs(int ms) const;
13 int msecs() const { return ds; }
18 static const unsigned MSECS_PER_DAY = 86400000;
20 QTime QTime::addMSecs(int ms) const
24 // % not well-defined for -ve, but / is.
25 int negdays = (MSECS_PER_DAY-ms) / MSECS_PER_DAY;
26 t.ds = ((int)ds + ms + negdays*MSECS_PER_DAY)
29 t.ds = ((int)ds + ms) % MSECS_PER_DAY;
36 if (QTime(1).addMSecs(1).msecs() != 2)