Mercurial > projects > dstress
view run/o/odd_bug_07_B.d @ 1597:8b9d4d2f925a
Fix typos in complex tests. See D bug 614.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Tue, 09 Sep 2008 16:53:58 +0200 |
parents | daef239f37cf |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ icee <iceelyne@gmail.com> // @date@ 2006-08-14 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=287 // @desc@ [Issue 287] DMD optimization bug arround dynamic array length module dstress.run.o.odd_bug_07_B; int status; void validate(int a, int b){ if(a != status){ assert(0); } status += 4; if(b != status){ assert(0); } } int main(){ int x = 0; int y = 0; char[] sa = "abcd"; for(int i = 0; i < 10; i++){ y = x + sa.length; validate(x, y); x = y; } if(status != 40){ assert(0); } return 0; }