Sign in
gnu
/
gcc
/
refs/tags/basepoints/gcc-13
/
.
/
gcc
/
testsuite
/
gdc.test
/
runnable
/
test18746.d
blob: a2cf38b20df7e7cde70f8714691cc23efad58a8b [
file
] [
log
] [
blame
]
// https://issues.dlang.org/show_bug.cgi?id=18746
struct
S
{}
S f
(
ref
int
i
)
{
++
i
;
return
S
();
}
void
main
()
{
int
i
=
2
;
assert
(
f
(
i
)
==
S
());
assert
(
i
==
3
);
/* failed before patch, i = 2; should pass */
}