Mercurial > projects > dstress
annotate run/t/tuple_23_B.d @ 1513:45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
Don Clugston <clugdbug@yahoo.com.au>
2007-04-11
http://d.puremagic.com/issues/show_bug.cgi?id=1125
author | thomask |
---|---|
date | Mon, 23 Apr 2007 18:09:16 +0000 |
parents | |
children |
rev | line source |
---|---|
1513
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
2 // $Date$ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
3 // $Author$ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
4 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
5 // @author@ Don Clugston <clugdbug@yahoo.com.au> |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
6 // @date@ 2007-04-11 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1125 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 1125] Segfault using tuple in asm code, when size not specified |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
9 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
10 module dstress.run.t.tuple_23_B; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
11 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
12 version(D_InlineAsm_X86){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
13 version = test; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
14 }else version(D_InlineAsm_X86_64){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
15 version = test; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
16 } |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
17 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
18 version(test){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
19 int foo(X...)(X expr){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
20 int i; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
21 asm{ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
22 mov EAX, expr[0]; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
23 mov i, EAX; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
24 } |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
25 return i; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
26 } |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
27 |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
28 int main(){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
29 if(3 != foo(3)){ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
30 assert(0); |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
31 } |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
32 return 0; |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
33 } |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
34 }else{ |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
35 static assert(0, "DSTRESS{XFAIL}: no inline X86 ASM support"); |
45c339264b57
[Issue 1125] Segfault using tuple in asm code, when size not specified
thomask
parents:
diff
changeset
|
36 } |