mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
21 lines
357 B
D
21 lines
357 B
D
// https://issues.dlang.org/show_bug.cgi?id=19672
|
|
|
|
struct S
|
|
{
|
|
ulong c;
|
|
bool b; // removing this prevents bug
|
|
}
|
|
|
|
// increase the struct size at least to 17 bytes also prevents the bug.
|
|
|
|
void main()
|
|
{
|
|
S[1] a = [S(42)];
|
|
assert(a[0].c == 42); /* Passes. */
|
|
f(a);
|
|
}
|
|
|
|
void f(S[1] a)
|
|
{
|
|
assert(a[0].c == 42); /* Fails. */
|
|
}
|