export pet_expr_new_cast
[pet.git] / tests / call_struct.scop
blob1f7497ed0af552ffb2412df1ac197403e0c3d3f4
1 start: 295
2 end: 407
3 indent: "\t"
4 context: '{  :  }'
5 types:
6 - name: s
7   definition: "struct s {\n    struct s0 c[10];\n}"
8 - name: s0
9   definition: "struct s0 {\n    struct {\n        int a[10];\n    } f[10];\n    int
10     b;\n}"
11 arrays:
12 - context: '{  :  }'
13   extent: '{ s[i0] : i0 >= 0 and i0 <= 9 }'
14   element_type: struct s
15   element_size: 4040
16   element_is_record: 1
17 - context: '{  :  }'
18   extent: '{ s_c[s[i0] -> c[i1]] : i0 >= 0 and i0 <= 9 and i1 >= 0 and i1 <= 9 }'
19   element_type: struct s0
20   element_size: 404
21   element_is_record: 1
22 - context: '{  :  }'
23   extent: '{ s_c_b[s_c[s[i0] -> c[i1]] -> b[]] : i0 >= 0 and i0 <= 9 and i1 >= 0 and
24     i1 <= 9 }'
25   element_type: int
26   element_size: 4
27 - context: '{  :  }'
28   extent: '{ s_c_f[s_c[s[i0] -> c[i1]] -> f[i2]] : i0 >= 0 and i0 <= 9 and i1 >= 0
29     and i1 <= 9 and i2 >= 0 and i2 <= 9 }'
30   element_type: <subfield>
31   element_size: 40
32   element_is_record: 1
33 - context: '{  :  }'
34   extent: '{ s_c_f_a[s_c_f[s_c[s[i0] -> c[i1]] -> f[i2]] -> a[i3]] : i0 >= 0 and i0
35     <= 9 and i1 >= 0 and i1 <= 9 and i2 >= 0 and i2 <= 9 and i3 >= 0 and i3 <= 9 }'
36   element_type: int
37   element_size: 4
38 statements:
39 - line: 30
40   domain: '{ S_0[] }'
41   schedule: '{ S_0[] -> [0] }'
42   body:
43     type: expression
44     expr:
45       type: call
46       name: bar
47       arguments:
48       - type: access
49         may_write: '{ S_0[] -> s_c_b[s_c[s[0] -> c[3]] -> b[]]; S_0[] -> s_c_f_a[s_c_f[s_c[s[0]
50           -> c[2]] -> f[o2]] -> a[o3]] : o2 >= 0 and o3 >= 0 and o3 <= 9 and o2 <=
51           9 }'
52         must_write: '{ S_0[] -> s_c_b[s_c[s[0] -> c[3]] -> b[]]; S_0[] -> s_c_f_a[s_c_f[s_c[s[0]
53           -> c[2]] -> f[o2]] -> a[o3]] : o2 >= 0 and o3 >= 0 and o3 <= 9 and o2 <=
54           9 }'
55         index: '{ S_0[] -> s_c[s[(0)] -> c[]] }'
56         depth: 2
57         reference: __pet_ref_0
58         read: 0
59         write: 1
60 - line: 32
61   domain: '{ S_1[i] : i >= 1 and i <= 3 }'
62   schedule: '{ S_1[i] -> [1, i] }'
63   body:
64     type: expression
65     expr:
66       type: call
67       name: bar
68       arguments:
69       - type: op
70         operation: '&'
71         arguments:
72         - type: access
73           may_write: '{ S_1[i] -> s_c_f_a[s_c_f[s_c[s[1] -> c[2 + i]] -> f[o2]] ->
74             a[o3]] : o3 >= 0 and o3 <= 9 and o2 <= 9 and o2 >= 0; S_1[i] -> s_c_b[s_c[s[1]
75             -> c[3 + i]] -> b[]] }'
76           must_write: '{ S_1[i] -> s_c_f_a[s_c_f[s_c[s[1] -> c[2 + i]] -> f[o2]] ->
77             a[o3]] : o3 >= 0 and o3 <= 9 and o2 <= 9 and o2 >= 0; S_1[i] -> s_c_b[s_c[s[1]
78             -> c[3 + i]] -> b[]] }'
79           index: '{ S_1[i] -> s_c[s[(1)] -> c[(i)]] }'
80           reference: __pet_ref_1
81           read: 0
82           write: 1
83 - line: 33
84   domain: '{ S_2[] }'
85   schedule: '{ S_2[] -> [2] }'
86   body:
87     type: expression
88     expr:
89       type: call
90       name: quux
91       arguments:
92       - type: op
93         operation: '&'
94         arguments:
95         - type: access
96           may_write: '{ S_2[] -> s_c_b[s_c[s[2] -> c[9]] -> b[]] }'
97           must_write: '{ S_2[] -> s_c_b[s_c[s[2] -> c[9]] -> b[]] }'
98           index: '{ S_2[] -> s_c_b[s_c[s[(2)] -> c[(9)]] -> b[]] }'
99           reference: __pet_ref_2
100           read: 0
101           write: 1