Mercurial > projects > dstress
annotate run/odd_bug_02.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 | 20d8ee6523e1 |
children |
rev | line source |
---|---|
140 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 | 5 // @author@ Ben Hinkle <bhinkle4@juno.com> |
6 // @date@ 2004-09-26 | |
140 | 7 // @uri@ news:cj6g4d$9iv$1@digitaldaemon.com |
1487 | 8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=1953 |
5 | 9 |
70
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
18
diff
changeset
|
10 module dstress.run.odd_bug_02; |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
18
diff
changeset
|
11 |
5f98d4a33d49
1) review of all test cases with unexpected results (except encoding and html/xml)
thomask
parents:
18
diff
changeset
|
12 // @WARNING@: this code requires phobos |
5 | 13 import std.stdarg; |
14 | |
15 struct TestStruct{ | |
16 void add(...){ | |
17 TestStruct other = va_arg!(TestStruct)(_argptr); | |
18 foreach(int value; other){ | |
19 foo(); | |
20 } | |
21 } | |
22 | |
23 void foo(){ | |
18 | 24 assert(left is null); |
5 | 25 bar(); |
26 } | |
27 | |
28 void bar(){ | |
18 | 29 assert(left is null); |
5 | 30 } |
31 | |
1535 | 32 int opApply(int delegate(ref int val) dg){ |
5 | 33 return 0; |
34 } | |
35 | |
36 void* left; | |
37 } | |
38 | |
39 int main(){ | |
40 TestStruct t; | |
41 t.foo(); | |
42 return 0; | |
43 } | |
44 |