MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / diag12678.d
blob8b17968fdbdd988ddbe43ef18ccf6d9a3cd7fbae
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/diag12678.d(21): Error: const field `cf1` initialized multiple times
5 fail_compilation/diag12678.d(20): Previous initialization is here.
6 fail_compilation/diag12678.d(24): Error: immutable field `if1` initialized multiple times
7 fail_compilation/diag12678.d(23): Previous initialization is here.
8 fail_compilation/diag12678.d(27): Error: const field `cf2` initialization is not allowed in loops or after labels
9 ---
12 struct S
14 const int cf1;
15 const int cf2;
16 immutable int if1;
18 this(int x)
20 cf1 = x;
21 cf1 = x;
23 if1 = x;
24 if1 = x;
26 foreach (i; 0 .. 5)
27 cf2 = x;