MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail4082.d
bloba09f725754bd4abfe576fc47a3d4f5649d50c573
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail4082.d(14): Error: destructor `fail4082.Foo.~this` is not `nothrow`
5 fail_compilation/fail4082.d(12): Error: function `fail4082.test1` may throw but is marked as `nothrow`
6 ---
7 */
8 struct Foo
10 ~this() { throw new Exception(""); }
12 nothrow void test1()
14 Foo f;
16 goto NEXT;
17 NEXT:
22 TEST_OUTPUT:
23 ---
24 fail_compilation/fail4082.d(32): Error: destructor `fail4082.Bar.~this` is not `nothrow`
25 fail_compilation/fail4082.d(32): Error: function `fail4082.test2` may throw but is marked as `nothrow`
26 ---
28 struct Bar
30 ~this() { throw new Exception(""); }
32 nothrow void test2(Bar t)