Files
ldc/tangotests/vararg4.d
Tomas Lindquist Olsen d03c3a7757 [svn r233] Added: -oq command line option for writing fully qualified object names.
Added: started support for x86 80bit floating point.
Changed: aggregates passed by value now use the llvm 'byval' parameter attribute, also lays ground work for
using other attributes.
Changed: eliminated a lot more std::vectorS, these showed up pretty much at the top when profiling!
Changed: performed other misc. cleanups.
Changed: halt expression now call the new llvm trap intrinsic instead of an assert(0).
Changed: dstress suite now passes -O0 by default, this only eliminates unreferenced globals, which speeds up
linking quite a bit.
2008-06-05 06:38:36 +02:00

31 lines
333 B
D

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");
}