Mercurial > projects > ldc
view test/aa3.d @ 237:a168a2c3ea48 trunk
[svn r253] Removed -inlineasm option. inline asm is now enabled by default unless the new -noasm option is passed.
Tried adding a stack trace print when compiler crashes, not sure it's working though.
Changed data layouts to match that of llvm-gcc.
Fixed casting function pointers.
Added support checks in AsmStatement.
author | lindquist |
---|---|
date | Sun, 08 Jun 2008 19:09:24 +0200 |
parents | 5ab8e92611f9 |
children | d9d5d59873d8 |
line wrap: on
line source
module aa3; void main() { int[string] aa; {aa["hello"] = 1;} {int* p = "" in aa;} aa[" worl"] = 2; aa["d"] = 3; aa["thisisgreat"] = 10; int sum; string cat; { foreach(k,v;aa) { printf("int[%.*s] = %d\n", k.length, k.ptr, v); sum += v; cat ~= k; } } assert(sum == 16); printf("cat = %.*s\n", cat.length, cat.ptr); assert(cat.length == 22); }