MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / verifyhookexist.d
blobd7b8f6646c3b393a40c0177aedcdbd4d3968d48c
1 /*
2 REQUIRED_ARGS: -checkaction=context
3 EXTRA_SOURCES: extra-files/minimal/object.d
4 */
6 /************************************************************/
8 /*
9 TEST_OUTPUT:
10 ---
11 fail_compilation/verifyhookexist.d(22): Error: `object.__ArrayCast` not found. The current runtime does not support casting array of structs, or the runtime is corrupt.
12 fail_compilation/verifyhookexist.d(28): Error: `object.__equals` not found. The current runtime does not support equal checks on arrays, or the runtime is corrupt.
13 fail_compilation/verifyhookexist.d(29): Error: `object.__cmp` not found. The current runtime does not support comparing arrays, or the runtime is corrupt.
14 fail_compilation/verifyhookexist.d(33): Error: `object._d_assert_fail` not found. The current runtime does not support generating assert messages, or the runtime is corrupt.
15 fail_compilation/verifyhookexist.d(36): Error: `object.__switch` not found. The current runtime does not support switch cases on strings, or the runtime is corrupt.
16 fail_compilation/verifyhookexist.d(41): Error: `object.__switch_error` not found. The current runtime does not support generating assert messages, or the runtime is corrupt.
17 ---
20 struct MyStruct { int a, b; }
21 MyStruct[] castToMyStruct(int[] arr) {
22 return cast(MyStruct[])arr;
25 void test() {
26 int[] arrA, arrB;
28 bool a = arrA[] == arrB[];
29 bool b = arrA < arrB;
32 int x = 1; int y = 1;
33 assert(x == y);
36 switch ("") {
37 default:
38 break;
41 final switch (0) {
42 case 1:
43 break;