Mercurial > projects > ldc
annotate tests/mini/a.d @ 1645:1d2d1aa16841
Don't error out with -singleobj, -of, and -c/-output-{bc,ll,o,s}.
author | Matti Niemenmaa <matti.niemenmaa+hg@iki.fi> |
---|---|
date | Tue, 09 Mar 2010 23:20:39 +0200 |
parents | 1bb99290e03a |
children |
rev | line source |
---|---|
1 | 1 module a; |
2 | |
270
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
3 extern(C) int printf(char*, ...); |
d9d5d59873d8
[svn r291] Fixed a bunch of the old Phobos tests to work with Tango.
lindquist
parents:
1
diff
changeset
|
4 |
1 | 5 int i = 42; |
6 | |
7 void main() | |
8 { | |
9 int j; | |
10 j = i; | |
11 int* p; | |
12 p = &j; | |
13 int k = *p; | |
14 assert(k == 42); | |
15 | |
16 byte b = -1; | |
17 int i = b; | |
18 assert(i == -1); | |
19 | |
20 int* p2 = p; | |
21 | |
22 printf("Done\n"); | |
23 } |