1 // EXTRA_CPP_SOURCES: cpp19179.cpp
3 // https://issues.dlang.org/show_bug.cgi?id=19179
5 import core
.stdc
.stdio
;
7 extern(C
++) struct SmallStruct
{ int x
= 10, y
= 20; }
10 SmallStruct
test_small(SmallStruct s
)
12 printf("%d %d\n", s
.x
, s
.y
); // prints: invalid memory
19 void test_small_noret(SmallStruct s
)
21 printf("%d %d\n", s
.x
, s
.y
); // prints: 10 20
26 extern (C
++) void cppmain();