Debian Codegraph @

gcc/testsuite/gdc.test/compilable/test15056.d

raw
1 nothrow:
2
3 version (Windows)
4 {
5 version (LP_64)
6 import core.stdc.stdlib;
7 else
8 // doesn't currently work b/c SEH remains present even in nothrow code
9 void* alloca(size_t) { return null; }
10 }
11 else
12 import core.stdc.stdlib;
13
14 struct S
15 {
16 ~this() nothrow {}
17 }
18
19 S foo(void* p = alloca(1234))
20 {
21 return S();
22 }
23
24 int main()
25 {
26 foo();
27 return 0;
28 }