MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / fail21868b.d
blob0df31d7de3f3ad796bfaa1e35df6f1859d5eeca6
1 /* REQUIRED_ARGS: -preview=dip1000
2 TEST_OUTPUT:
3 ---
4 fail_compilation/fail21868b.d(19): Error: returning `&s.x` escapes a reference to parameter `s`
5 fail_compilation/fail21868b.d(17): perhaps change the `return scope` into `scope return`
6 ---
7 */
9 // https://issues.dlang.org/show_bug.cgi?id=21868
11 struct S
13 int x;
14 int* y;
17 int* test(ref return scope S s) @safe
19 return &s.x;