MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test11176.d
blob5ef7324ce8ca8a94f0ada34077fa018dd99214de
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/test11176.d(12): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead
5 fail_compilation/test11176.d(16): Error: `b.ptr` cannot be used in `@safe` code, use `&b[0]` instead
6 ---
7 */
9 // https://issues.dlang.org/show_bug.cgi?id=11176
11 @safe ubyte oops(ubyte[] b) {
12 return *b.ptr;
15 @safe ubyte oops(ubyte[0] b) {
16 return *b.ptr;
19 @safe ubyte cool(ubyte[1] b) {
20 return *b.ptr;