Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/931004-11.c

raw
1 void abort (void);
2 void exit (int);
3
4 struct tiny
5 {
6 char c;
7 char d;
8 char e;
9 };
10
11 void
12 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
13 {
14 if (x.c != 10)
15 abort();
16 if (x.d != 20)
17 abort();
18 if (x.e != 30)
19 abort();
20
21 if (y.c != 11)
22 abort();
23 if (y.d != 21)
24 abort();
25 if (y.e != 31)
26 abort();
27
28 if (z.c != 12)
29 abort();
30 if (z.d != 22)
31 abort();
32 if (z.e != 32)
33 abort();
34
35 if (l != 123)
36 abort ();
37 }
38
39 int
40 main (void)
41 {
42 struct tiny x[3];
43 x[0].c = 10;
44 x[1].c = 11;
45 x[2].c = 12;
46 x[0].d = 20;
47 x[1].d = 21;
48 x[2].d = 22;
49 x[0].e = 30;
50 x[1].e = 31;
51 x[2].e = 32;
52 f (3, x[0], x[1], x[2], (long) 123);
53 exit(0);
54 }
55