MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test22709.d
blobdd5258e0b376593c16a526de0333bb7453dc3f21
1 /*
2 REQUIRED_ARGS: -preview=dip1000
3 TEST_OUTPUT:
4 ---
5 fail_compilation/test22709.d(15): Error: address of variable `local` assigned to `arr` with longer lifetime
6 fail_compilation/test22709.d(20): Error: address of variable `local` assigned to `arr` with longer lifetime
7 ---
8 */
10 // https://issues.dlang.org/show_bug.cgi?id=22709
11 @safe:
13 void escape(ref ubyte[] arr, ref ubyte[64] local)
15 arr = local[];
18 void escape1(ref ubyte[64] local, ref ubyte[] arr)
20 arr = local[];
23 ubyte[] getArr()
25 ubyte[64] blob;
26 ubyte[] arr;
27 escape(arr, blob[]);
28 return arr;