MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail176.d
blob797407ed2c44ac2211bad5b53d87b4a9e3fd062f
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail176.d(13): Error: cannot modify `immutable` expression `a[1]`
5 fail_compilation/fail176.d(16): Error: cannot modify `immutable` expression `b[1]`
6 fail_compilation/fail176.d(19): Error: cannot modify `const` expression `c[1]`
7 ---
8 */
10 void foo()
12 auto a = "abc";
13 a[1] = 'd';
15 immutable char[3] b = "abc";
16 b[1] = 'd';
18 const char[3] c = "abc";
19 c[1] = 'd';