Mercurial > projects > ldc
view test/alloca1.d @ 307:7ade5e035beb trunk
[svn r328] Fixed an issue with interfaces where the vtable type of a interface implemented could be invalid. Fixes several tango modules like, FileStream, ServerSocket
and most tina cluster modules :)
author | lindquist |
---|---|
date | Sat, 28 Jun 2008 03:45:18 +0200 |
parents | d9d5d59873d8 |
children |
line wrap: on
line source
module alloca1; pragma(LLVM_internal, "alloca") void* alloca(uint); extern(C) int printf(char*, ...); void main() { int n = 16; int* p = cast(int*)alloca(n*int.sizeof); int[] a = p[0..n]; a[] = 0; foreach(i,v; a) { printf("a[%2d] = %d\n", i, v); } }