Mercurial > projects > ldc
view tests/mini/vararg7.d @ 353:a7a26f538d6e trunk
[svn r374] Move label target basic block from AST to IRFunction. This is a first step to allowing labels to be emitted multiple times. (for instance within finally blocks)
author | ChristianK |
---|---|
date | Mon, 14 Jul 2008 11:07:15 +0200 |
parents | 1bb99290e03a |
children |
line wrap: on
line source
module tangotests.vararg4; extern(C) int printf(char*, ...); struct S { int i; } void func(...) { S* sp = cast(S*)_argptr; assert(sp.i == 42); } void main() { printf("1st:\n"); { S s = S(42); func(s); } printf("ok\n"); printf("2nd:\n"); { func(S(42)); } printf("ok\n"); }