mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
46 lines
467 B
D
46 lines
467 B
D
// PERMUTE_ARGS: -O
|
|
|
|
// https://issues.dlang.org/show_bug.cgi?id=17940
|
|
|
|
struct Array
|
|
{
|
|
long length;
|
|
long ptr;
|
|
}
|
|
|
|
struct Struct
|
|
{
|
|
bool b = true;
|
|
}
|
|
|
|
void fun1(int)
|
|
{
|
|
}
|
|
|
|
void fun2(Array arr, int, int)
|
|
{
|
|
assert(!arr.length);
|
|
}
|
|
|
|
void fn(Struct* str)
|
|
{
|
|
Array arr;
|
|
if (!str)
|
|
{
|
|
return;
|
|
}
|
|
if (str)
|
|
{
|
|
fun1(str.b);
|
|
}
|
|
if (str.b)
|
|
{
|
|
fun2(arr, str.b, 0);
|
|
}
|
|
}
|
|
|
|
void main()
|
|
{
|
|
Struct s;
|
|
fn(&s);
|
|
}
|