Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/retscope4.d

raw
1 /*
2 REQUIRED_ARGS: -de
3 */
4
5 /*
6 TEST_OUTPUT:
7 ---
8 fail_compilation/retscope4.d(3007): Deprecation: slice of static array temporary returned by `func()` assigned to longer lived variable `a`
9 ---
10 */
11
12 #line 3000
13
14 // https://issues.dlang.org/show_bug.cgi?id=12625
15
16 int[16] func();
17
18 void foo()
19 {
20 int[] a = func();
21 }