annotate run/a/array_initialization_26_C.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 add5b6666997
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1167
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
1 // $HeadURL$
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
2 // $Date$
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
3 // $Author$
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
4
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
5 module dstress.run.a.array_initialization_26_B;
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
6
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
7 int main(){
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
8 auto a = new int [][](1, 1);
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
9
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
10 static if(!is(typeof(a[0][0]) == int)){
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
11 static assert(0);
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
12 }
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
13
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
14 if((a.length != 1) || (a[0].length != 1)){
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
15 assert(0);
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
16 }
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
17 if(a[0][0] != 0){
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
18 assert(0);
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
19 }
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
20
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
21 return 0;
add5b6666997 added basic tests for DMD-0.167's multidimensional array allocation
thomask
parents:
diff changeset
22 }