blob: 749785262efc534e7eb3669aa732ade90f5e1455 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
typedef struct {
int v[4];
} Test1;
Test1 func2();
int func1()
{
Test1 test;
test = func2();
if (test.v[0] != 10)
abort ();
if (test.v[1] != 20)
abort ();
if (test.v[2] != 30)
abort ();
if (test.v[3] != 40)
abort ();
}
Test1 func2()
{
Test1 tmp;
tmp.v[0] = 10;
tmp.v[1] = 20;
tmp.v[2] = 30;
tmp.v[3] = 40;
return tmp;
}
int main()
{
func1();
exit (0);
}
|