add support for structs
[pet.git] / tests / struct8.scop
blobb400a180d1c237f8a8711c6b0da79525c7fd235d
1 start: 101
2 end: 225
3 context: '{  :  }'
4 types:
5 - name: s
6   definition: "struct s {\n    struct {\n        struct {\n            int a[10];\n
7     \       } f[10];\n        int b;\n    };\n}"
8 arrays:
9 - context: '{  :  }'
10   extent: '{ s[] }'
11   element_type: struct s
12   element_size: 404
13   element_is_record: 1
14 - context: '{  :  }'
15   extent: '{ s_f[s[] -> f[i0]] : i0 >= 0 and i0 <= 9 }'
16   element_type: <subfield>
17   element_size: 40
18   element_is_record: 1
19 - context: '{  :  }'
20   extent: '{ s_f_a[s_f[s[] -> f[i0]] -> a[i1]] : i0 >= 0 and i0 <= 9 and i1 >= 0 and
21     i1 <= 9 }'
22   element_type: int
23   element_size: 4
24 - context: '{  :  }'
25   extent: '{ s_b[s[] -> b[]] }'
26   element_type: int
27   element_size: 4
28 statements:
29 - line: 17
30   domain: '{ S_0[i, j] : i >= 0 and i <= 9 and j >= 0 and j <= 9 }'
31   schedule: '{ S_0[i, j] -> [0, i, j] }'
32   body:
33     type: binary
34     operation: =
35     arguments:
36     - type: access
37       relation: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[i]] -> a[j]] }'
38       index: '{ S_0[i, j] -> s_f_a[s_f[s[] -> f[(i)]] -> a[(j)]] }'
39       reference: __pet_ref_0
40       read: 0
41       write: 1
42     - type: binary
43       operation: '*'
44       arguments:
45       - type: access
46         relation: '{ S_0[i, j] -> [i] }'
47         index: '{ S_0[i, j] -> [(i)] }'
48         reference: __pet_ref_1
49         read: 1
50         write: 0
51       - type: access
52         relation: '{ S_0[i, j] -> [j] }'
53         index: '{ S_0[i, j] -> [(j)] }'
54         reference: __pet_ref_2
55         read: 1
56         write: 0
57 - line: 18
58   domain: '{ S_1[] }'
59   schedule: '{ S_1[] -> [1] }'
60   body:
61     type: binary
62     operation: =
63     arguments:
64     - type: access
65       relation: '{ S_1[] -> s_b[s[] -> b[]] }'
66       index: '{ S_1[] -> s_b[s[] -> b[]] }'
67       reference: __pet_ref_3
68       read: 0
69       write: 1
70     - type: access
71       relation: '{ S_1[] -> [1] }'
72       index: '{ S_1[] -> [(1)] }'
73       reference: __pet_ref_4
74       read: 1
75       write: 0