ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gdc.test/runnable/inline14560.d

18 lines
375 B
D
Raw Normal View History

2024-04-01 15:19:46 +00:00
// PERMUTE_ARGS: -inline -release -g -O
auto serialize(T)(T value)
{
foreach (i; value) { }
return; // important
// By this ReturnStatement with NULL exp wrongly appears in the
// expanded result of serialize(["test"]) call in main(), it will
// return from main() without setting exit code.
}
int main()
{
serialize(["test"]);
return 0;
}