Sign in
gnu
/
gcc
/
30f399ee9318bcb44e3e2debde086303157a347d
/
.
/
gcc
/
testsuite
/
gdc.test
/
fail_compilation
/
fail22366.d
blob: 6960d5e41d8bca082c3fb3627c4d1191c17683b6 [
file
] [
log
] [
blame
]
// REQUIRED_ARGS: -dip1000
/*
TEST_OUTPUT:
---
fail_compilation/fail22366.d(13): Error: scope variable `x` may not be copied into allocated memory
---
*/
int
*
fun
(
scope
int
*
x
)
@safe
{
int
*[
int
]
aa
;
aa
[
0
]
=
x
;
// should give an error
return
aa
[
0
];
}