Mercurial > projects > dstress
annotate run/o/opSliceAssign_03_A.d @ 1321:e6887749b811
cleaned up remaining puremagic @uri@s
author | thomask |
---|---|
date | Sun, 31 Dec 2006 20:00:02 +0000 |
parents | f41655c00b51 |
children |
rev | line source |
---|---|
1236
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
2 // $Date$ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
3 // $Author$ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
4 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
5 // @author@ Gregor Richards <akaquinn@hotmail.com> |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
6 // @date@ 2006-11-20 |
1321 | 7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=578 |
1236
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 578] New: GDC evaluates rvalue of array assignment repeatedly |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
9 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
10 module dstress.run.o.opSliceAssign_03_A; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
11 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
12 int status; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
13 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
14 int test(){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
15 status++; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
16 if(status != 1){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
17 assert(0); |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
18 } |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
19 return status; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
20 } |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
21 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
22 int main(){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
23 int[10] a; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
24 a[] = test(); |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
25 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
26 if(a.length != 10){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
27 assert(0); |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
28 } |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
29 foreach(int i; a){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
30 if(i != 1){ |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
31 assert(0); |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
32 } |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
33 } |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
34 |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
35 return 0; |
f41655c00b51
[Issue 578] New: GDC evaluates rvalue of array assignment repeatedly
thomask
parents:
diff
changeset
|
36 } |