Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/931004-13.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 char f;
10 };
11
12 void
13 f (int n, struct tiny x, struct tiny y, struct tiny z, long l)
14 {
15 if (x.c != 10)
16 abort();
17 if (x.d != 20)
18 abort();
19 if (x.e != 30)
20 abort();
21 if (x.f != 40)
22 abort();
23
24 if (y.c != 11)
25 abort();
26 if (y.d != 21)
27 abort();
28 if (y.e != 31)
29 abort();
30 if (y.f != 41)
31 abort();
32
33 if (z.c != 12)
34 abort();
35 if (z.d != 22)
36 abort();
37 if (z.e != 32)
38 abort();
39 if (z.f != 42)
40 abort();
41
42 if (l != 123)
43 abort ();
44 }
45
46 int
47 main (void)
48 {
49 struct tiny x[3];
50 x[0].c = 10;
51 x[1].c = 11;
52 x[2].c = 12;
53 x[0].d = 20;
54 x[1].d = 21;
55 x[2].d = 22;
56 x[0].e = 30;
57 x[1].e = 31;
58 x[2].e = 32;
59 x[0].f = 40;
60 x[1].f = 41;
61 x[2].f = 42;
62 f (3, x[0], x[1], x[2], (long) 123);
63 exit(0);
64 }
65