MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / ctfe14207.d
blobbecc068b0c67b902fe4a2b280f2727a139cc951d
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ctfe14207.d(13): Error: cannot convert `&immutable(ulong)` to `ubyte[8]*` at compile time
5 fail_compilation/ctfe14207.d(18): called from here: `nativeToBigEndian()`
6 fail_compilation/ctfe14207.d(22): called from here: `digest()`
7 ---
8 */
10 ubyte[8] nativeToBigEndian()
12 immutable ulong res = 1;
13 return *cast(ubyte[8]*) &res;
16 auto digest()
18 ubyte[8] bits = nativeToBigEndian();
19 return bits;
22 enum h = digest();