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