Mercurial > projects > dstress
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 |
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 | 5 // @author@ Thomas Kühne <thomas-dloop@kuehne.cn> |
6 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=727 | |
7 // @desc@ [Issue 727] -inline: missing return in short function causes incorrect code generation | |
8 | |
756 | 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 | 20 if(2 != test(0)){ |
21 assert(0); | |
22 } | |
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 } |