annotate run/return_06.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 902d2c168029
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
322
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
1 // $HeadURL$
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
2 // $Date$
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
3 // $Author$
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
4
1380
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
5 // @author@ Thomas Kühne <thomas-dloop@kuehne.cn>
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
6 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=727
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
7 // @desc@ [Issue 727] -inline: missing return in short function causes incorrect code generation
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
8
756
9a121126b077 major "Torture" review
thomask
parents: 322
diff changeset
9 // __DSTRESS_TORTURE_BLOCK__ -release
322
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
10
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
11 module dstress.run.return_06;
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
12
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
13 int test(int i){
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
14 if(i==0){
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
15 return 2;
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
16 }
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
17 }
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
18
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
19 int main(){
1380
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
20 if(2 != test(0)){
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
21 assert(0);
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
22 }
902d2c168029 updates for DMD-1.007
thomask
parents: 756
diff changeset
23
322
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
24 try{
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
25 test(1);
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
26 }catch{
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
27 return 0;
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
28 }
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
29 assert(0);
0c38b6a3aab2 paths without return statements are specifically allowed, the compiler has to insert an assert(0)
thomask
parents:
diff changeset
30 }