]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gdc.test/fail_compilation/fail10964.d
d: Merge upstream dmd 3982604c5, druntime bc58b1e9, phobos 12329adb6.
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail10964.d
CommitLineData
b4c522fa
IB
1/*
2TEST_OUTPUT:
3---
5fee5ec3
IB
4fail_compilation/fail10964.d(28): Error: function `fail10964.S.__postblit` is not `nothrow`
5fail_compilation/fail10964.d(29): Error: function `fail10964.S.__postblit` is not `nothrow`
6fail_compilation/fail10964.d(30): Error: function `fail10964.S.__postblit` is not `nothrow`
7fail_compilation/fail10964.d(33): Error: function `fail10964.S.__postblit` is not `nothrow`
9c7d5e88
IB
8fail_compilation/fail10964.d(34): Error: function `core.internal.array.construction._d_arraysetctor!(S[], S)._d_arraysetctor` is not `nothrow`
9fail_compilation/fail10964.d(35): Error: function `core.internal.array.construction._d_arrayctor!(S[], S)._d_arrayctor` is not `nothrow`
5fee5ec3 10fail_compilation/fail10964.d(22): Error: `nothrow` function `fail10964.foo` may throw
b4c522fa
IB
11---
12*/
13
14struct S
15{
16 this(this)
17 {
18 throw new Exception("BOOM!");
19 }
20}
21
22void foo() nothrow
23{
24 S ss;
25 S[1] sa;
26
27 // TOKassign
28 ss = ss;
29 sa = ss;
30 sa = sa;
31
32 // TOKconstruct
33 S ss2 = ss;
34 S[1] sa2 = ss;
35 S[1] sa3 = sa;
36}