pet_codegen.c: add missing include
[pet.git] / tests / call_struct.c
blob4cf7fb48e68072ab145b8db527852e76befde918
1 struct s0 {
2 struct {
3 int a[10];
4 } f[10];
5 int b;
6 };
8 struct s {
9 struct s0 c[10];
12 void bar(struct s0 t[static 5])
14 for (int i = 0; i < 10; ++i)
15 for (int j = 0; j < 10; ++j)
16 t[2].f[i].a[j] = i * j;
17 t[3].b = 1;
20 void quux(int a[1])
22 a[0] = 5;
25 void foo()
27 struct s s[10];
29 #pragma scop
30 bar(s[0].c);
31 for (int i = 1; i < 4; ++i)
32 bar(&s[1].c[i]);
33 quux(&s[2].c[9].b);
34 #pragma endscop