Mercurial > projects > dstress
annotate run/t/template_62_A.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 | 891196dcfc3a |
children |
rev | line source |
---|---|
1514
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
2 // $Date$ |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
3 // $Author$ |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
4 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
5 // @author@ Tomasz Stachowiak <h3r3tic@mat.uni.torun.pl> |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
6 // @date@ 2007-03-19 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1068 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 1068] stack corruption with mixins and function templates |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
9 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
10 // __DSTRESS_DFLAGS__ run/t/template_62_B.d |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
11 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
12 module /*dstress.*/run.t.template_62_A; |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
13 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
14 template Mix() { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
15 static void foobar() { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
16 auto context = new Context; |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
17 context.func!(typeof(this))(); |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
18 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
19 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
20 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
21 class Bar { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
22 mixin Mix!(); |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
23 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
24 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
25 void someFunc(char[] z) { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
26 if(1 != z.length){ |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
27 assert(0); |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
28 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
29 if("a" != z){ |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
30 assert(0); |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
31 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
32 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
33 |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
34 class Context { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
35 void func(T)() { |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
36 someFunc(`a`); |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
37 } |
891196dcfc3a
[Issue 1068] stack corruption with mixins and function templates
thomask
parents:
diff
changeset
|
38 } |