Mercurial > projects > dstress
view run/o/opSliceAssign_03_A.d @ 1630:d0efa3ae5522 default tip
run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author | David Nadlinger <code@klickverbot.at> |
---|---|
date | Sat, 23 Apr 2011 22:57:32 +0200 |
parents | e6887749b811 |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ // @author@ Gregor Richards <akaquinn@hotmail.com> // @date@ 2006-11-20 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=578 // @desc@ [Issue 578] New: GDC evaluates rvalue of array assignment repeatedly module dstress.run.o.opSliceAssign_03_A; int status; int test(){ status++; if(status != 1){ assert(0); } return status; } int main(){ int[10] a; a[] = test(); if(a.length != 10){ assert(0); } foreach(int i; a){ if(i != 1){ assert(0); } } return 0; }