Mercurial > projects > dstress
view run/o/odd_bug_08_H.d @ 1127:08057f3259c9
[Issue 326] New: calculation bug
sugiyama <sugiyama563@msn.com>
2006-09-06
news:bug-326-3@http.d.puremagic.com/issues/
author | thomask |
---|---|
date | Thu, 07 Sep 2006 07:51:27 +0000 |
parents | |
children | daef239f37cf |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ sugiyama <sugiyama563@msn.com> // @date@ 2006-09-06 // @uri@ news:bug-326-3@http.d.puremagic.com/issues/ // @desc@ [Issue 326] New: calculation bug module dstress.run.o.odd_bug_08_H; void check(int i){ static int expected = 1; if(i != expected){ assert(0); } expected++; } long x = 2, y = 1; int main() { int res = 0; for(int i = 0; i < 10; i++) { res = res + x - y; check(res); } return 0; }