Mercurial > projects > ldc
annotate tests/mini/bug10.d @ 1083:c1e9f612e2e2
Fix for dual operand form of fistp, also make reg ST(0) explicit and fix lindquists
previous code that allowed dual operand form of fstp but dissallowed the single
operand form accidently
author | Kelly Wilson <wilsonk cpsc.ucalgary.ca> |
---|---|
date | Tue, 10 Mar 2009 06:23:26 -0600 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
40 | 1 module bug10; |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
40
diff
changeset
|
2 extern(C) int printf(char*, ...); |
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
40
diff
changeset
|
3 |
40 | 4 class C |
5 { | |
6 char[] msg; | |
7 | |
8 this() | |
9 { | |
10 } | |
11 this(char[] msg) | |
12 { | |
13 this.msg = msg; | |
14 } | |
15 } | |
16 | |
17 void main() | |
18 { | |
19 auto c = new C(); | |
20 c.msg = "world"; | |
21 auto b = new C("hello"); | |
22 printf("%.*s\n", b.msg.length, b.msg.ptr); | |
23 printf("%.*s\n", c.msg.length, c.msg.ptr); | |
24 } |