Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/990525-2.c

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