* invalid_dup_maxstack.il: the test wasn't generating the failing condition
[mono.git] / mono / tests / verifier / make_tests.sh
1 #! /bin/sh
2
3 # Stack Size Tests
4 for OP in 'starg.s 0' 'stloc.0' 'stloc.s 0' 'stfld int32 Class::fld' pop ret
5 do
6   ./make_stack_0_test.sh "$OP"
7 done
8
9 for OP in add and 'box [mscorlib]System.Int32' 'brfalse branch_target' ceq cgt clt conv.i4 conv.r8 div dup 'ldfld int32 Class::fld' 'ldflda int32 Class::fld' mul not or rem shl shr sub xor
10 do
11   ./make_stack_0_pop_test.sh "$OP"
12 done
13
14 for OP in add and ceq cgt clt div dup mul or rem shl shr sub xor 'stfld int32 Class::fld'
15 do
16   ./make_stack_1_pop_test.sh "$OP" int32
17 done
18
19 # Table 2: Binary Numeric Operators
20 I=1
21 for OP in add div mul rem sub
22 do
23   ./make_bin_test.sh bin_num_op_32_${I} valid $OP int32 int32
24   ./make_bin_test.sh bin_num_op_33_${I} valid $OP int32 'native int'
25   ./make_bin_test.sh bin_num_op_34_${I} valid $OP int64 int64
26   ./make_bin_test.sh bin_num_op_35_${I} valid $OP 'native int' int32
27   ./make_bin_test.sh bin_num_op_36_${I} valid $OP 'native int' 'native int'
28   ./make_bin_test.sh bin_num_op_37_${I} valid $OP float64 float64
29   ./make_bin_test.sh bin_num_op_38_${I} valid $OP float32 float64
30   ./make_bin_test.sh bin_num_op_39_${I} valid $OP float64 float32
31   ./make_bin_test.sh bin_num_op_40_${I} valid $OP float32 float32
32   
33   ./make_bin_test.sh bin_num_op_1_${I} invalid $OP int32 int64
34   ./make_bin_test.sh bin_num_op_2_${I} invalid $OP int32 float64
35   ./make_bin_test.sh bin_num_op_3_${I} invalid $OP int32 object
36
37   ./make_bin_test.sh bin_num_op_4_${I} invalid $OP int64 int32
38   ./make_bin_test.sh bin_num_op_5_${I} invalid $OP int64 'native int'
39   ./make_bin_test.sh bin_num_op_6_${I} invalid $OP int64 float64
40   ./make_bin_test.sh bin_num_op_7_${I} invalid $OP int64 'int64&'
41   ./make_bin_test.sh bin_num_op_8_${I} invalid $OP int64 object
42
43   ./make_bin_test.sh bin_num_op_9_${I} invalid $OP 'native int' int64
44   ./make_bin_test.sh bin_num_op_10_${I} invalid $OP 'native int' float64
45   ./make_bin_test.sh bin_num_op_11_${I} invalid $OP 'native int' object
46
47   ./make_bin_test.sh bin_num_op_12_${I} invalid $OP float64 int32
48   ./make_bin_test.sh bin_num_op_13_${I} invalid $OP float64 int64
49   ./make_bin_test.sh bin_num_op_14_${I} invalid $OP float64 'native int'
50   ./make_bin_test.sh bin_num_op_15_${I} invalid $OP float64 'float64&'
51   ./make_bin_test.sh bin_num_op_16_${I} invalid $OP float64 object
52
53   ./make_bin_test.sh bin_num_op_17_${I} invalid $OP 'int64&' int64
54   ./make_bin_test.sh bin_num_op_18_${I} invalid $OP 'float64&' float64
55   ./make_bin_test.sh bin_num_op_19_${I} invalid $OP 'object&' object
56
57   ./make_bin_test.sh bin_num_op_20_${I} invalid $OP object int32
58   ./make_bin_test.sh bin_num_op_21_${I} invalid $OP object int64
59   ./make_bin_test.sh bin_num_op_22_${I} invalid $OP object 'native int'
60   ./make_bin_test.sh bin_num_op_23_${I} invalid $OP object float64
61   ./make_bin_test.sh bin_num_op_24_${I} invalid $OP object 'object&'
62   ./make_bin_test.sh bin_num_op_25_${I} invalid $OP object object
63   I=`expr $I + 1`
64 done
65
66 I=1
67 for OP in div mul rem sub
68 do
69   ./make_bin_test.sh bin_num_op_26_${I} invalid $OP int32 'int32&'
70   ./make_bin_test.sh bin_num_op_27_${I} invalid $OP 'native int' 'native int&'
71   I=`expr $I + 1`
72 done
73
74 for OP in add
75 do
76   ./make_bin_test.sh bin_num_op_26_${I} unverifiable $OP int32 'int32&'
77   ./make_bin_test.sh bin_num_op_27_${I} unverifiable $OP 'native int' 'native int&'
78   I=`expr $I + 1`
79 done
80
81 I=1
82 for OP in div mul rem
83 do
84   ./make_bin_test.sh bin_num_op_28_${I} invalid $OP 'int32&' int32
85   ./make_bin_test.sh bin_num_op_29_${I} invalid $OP 'native int&' 'native int'
86   I=`expr $I + 1`
87 done
88
89 for OP in add sub
90 do
91   ./make_bin_test.sh bin_num_op_28_${I} unverifiable $OP 'int32&' int32
92   ./make_bin_test.sh bin_num_op_29_${I} unverifiable $OP 'native int&' 'native int'
93   I=`expr $I + 1`
94 done
95
96 I=1
97 for OP in div mul rem add
98 do
99   ./make_bin_test.sh bin_num_op_30_${I} invalid $OP 'int32&' 'int32&'
100   I=`expr $I + 1`
101 done
102
103 for OP in sub
104 do
105   ./make_bin_test.sh bin_num_op_30_${I} unverifiable $OP 'int32&' 'int32&'
106   I=`expr $I + 1`
107 done
108
109 # Table 4: Binary Comparison or Branch Operations
110 I=1
111 for OP in ceq cgt clt
112 do
113   ./make_bin_test.sh bin_comp_op_1_${I} invalid $OP int32 int64
114   ./make_bin_test.sh bin_comp_op_2_${I} invalid $OP int32 float64
115   ./make_bin_test.sh bin_comp_op_3_${I} invalid $OP int32 'int32&'
116   ./make_bin_test.sh bin_comp_op_4_${I} invalid $OP int32 object
117
118   ./make_bin_test.sh bin_comp_op_5_${I} invalid $OP int64 int32
119   ./make_bin_test.sh bin_comp_op_6_${I} invalid $OP int64 'native int'
120   ./make_bin_test.sh bin_comp_op_7_${I} invalid $OP int64 float64
121   ./make_bin_test.sh bin_comp_op_8_${I} invalid $OP int64 'int64&'
122   ./make_bin_test.sh bin_comp_op_9_${I} invalid $OP int64 object
123
124   ./make_bin_test.sh bin_comp_op_10_${I} invalid $OP 'native int' int64
125   ./make_bin_test.sh bin_comp_op_11_${I} invalid $OP 'native int' float64
126   ./make_bin_test.sh bin_comp_op_12_${I} invalid $OP 'native int' object
127
128   ./make_bin_test.sh bin_comp_op_13_${I} invalid $OP float64 int32
129   ./make_bin_test.sh bin_comp_op_14_${I} invalid $OP float64 int64
130   ./make_bin_test.sh bin_comp_op_15_${I} invalid $OP float64 'native int'
131   ./make_bin_test.sh bin_comp_op_16_${I} invalid $OP float64 'float64&'
132   ./make_bin_test.sh bin_comp_op_17_${I} invalid $OP float64 object
133
134   ./make_bin_test.sh bin_comp_op_18_${I} invalid $OP 'int32&' int32
135   ./make_bin_test.sh bin_comp_op_19_${I} invalid $OP 'int64&' int64
136   ./make_bin_test.sh bin_comp_op_20_${I} invalid $OP 'float64&' float64
137   ./make_bin_test.sh bin_comp_op_21_${I} invalid $OP 'object&' object
138
139   ./make_bin_test.sh bin_comp_op_22_${I} invalid $OP object int32
140   ./make_bin_test.sh bin_comp_op_23_${I} invalid $OP object int64
141   ./make_bin_test.sh bin_comp_op_24_${I} invalid $OP object 'native int'
142   ./make_bin_test.sh bin_comp_op_25_${I} invalid $OP object float64
143   ./make_bin_test.sh bin_comp_op_26_${I} invalid $OP object 'object&'
144   I=`expr $I + 1`
145 done
146
147 I=1
148 for OP in cgt clt
149 do
150   ./make_bin_test.sh bin_comp_op_27_${I} invalid $OP 'native int' 'native int&'
151   ./make_bin_test.sh bin_comp_op_28_${I} invalid $OP 'native int&' 'native int'
152   ./make_bin_test.sh bin_comp_op_29_${I} invalid $OP object object
153   I=`expr $I + 1`
154 done
155
156 for OP in ceq
157 do
158   ./make_bin_test.sh bin_comp_op_27_${I} unverifiable $OP 'native int' 'native int&'
159   ./make_bin_test.sh bin_comp_op_28_${I} unverifiable $OP 'native int&' 'native int'
160   I=`expr $I + 1`
161 done
162
163 # Table 5: Integer Operations
164 I=1
165 for OP in and or xor
166 do
167   ./make_bin_test.sh bin_int_op_1_${I} invalid "$OP" int32 int64
168   ./make_bin_test.sh bin_int_op_2_${I} invalid "$OP" int32 float64
169   ./make_bin_test.sh bin_int_op_3_${I} invalid "$OP" int32 'int32&'
170   ./make_bin_test.sh bin_int_op_4_${I} invalid "$OP" int32 object
171
172   ./make_bin_test.sh bin_int_op_5_${I} invalid "$OP" int64 int32
173   ./make_bin_test.sh bin_int_op_6_${I} invalid "$OP" int64 'native int'
174   ./make_bin_test.sh bin_int_op_7_${I} invalid "$OP" int64 float64
175   ./make_bin_test.sh bin_int_op_8_${I} invalid "$OP" int64 'int64&'
176   ./make_bin_test.sh bin_int_op_9_${I} invalid "$OP" int64 object
177
178   ./make_bin_test.sh bin_int_op_10_${I} invalid "$OP" 'native int' int64
179   ./make_bin_test.sh bin_int_op_11_${I} invalid "$OP" 'native int' float64
180   ./make_bin_test.sh bin_int_op_12_${I} invalid "$OP" 'native int' 'native int&'
181   ./make_bin_test.sh bin_int_op_13_${I} invalid "$OP" 'native int' object
182
183   ./make_bin_test.sh bin_int_op_14_${I} invalid "$OP" float64 int32
184   ./make_bin_test.sh bin_int_op_15_${I} invalid "$OP" float64 int64
185   ./make_bin_test.sh bin_int_op_16_${I} invalid "$OP" float64 'native int'
186   ./make_bin_test.sh bin_int_op_17_${I} invalid "$OP" float64 float64
187   ./make_bin_test.sh bin_int_op_18_${I} invalid "$OP" float64 'int32&'
188   ./make_bin_test.sh bin_int_op_19_${I} invalid "$OP" float64 object
189
190   ./make_bin_test.sh bin_int_op_20_${I} invalid "$OP" 'int32&' int32
191   ./make_bin_test.sh bin_int_op_21_${I} invalid "$OP" 'int64&' int64
192   ./make_bin_test.sh bin_int_op_22_${I} invalid "$OP" 'native int&' 'native int'
193   ./make_bin_test.sh bin_int_op_23_${I} invalid "$OP" 'float64&' float64
194   ./make_bin_test.sh bin_int_op_24_${I} invalid "$OP" 'int32&' 'int32&'
195   ./make_bin_test.sh bin_int_op_25_${I} invalid "$OP" 'float64&' object
196
197   ./make_bin_test.sh bin_int_op_26_${I} invalid "$OP" object int32
198   ./make_bin_test.sh bin_int_op_27_${I} invalid "$OP" object int64
199   ./make_bin_test.sh bin_int_op_28_${I} invalid "$OP" object 'native int'
200   ./make_bin_test.sh bin_int_op_29_${I} invalid "$OP" object float64
201   ./make_bin_test.sh bin_int_op_30_${I} invalid "$OP" object 'int32&'
202   ./make_bin_test.sh bin_int_op_31_${I} invalid "$OP" object object
203   I=`expr $I + 1`
204 done
205
206 for OP in "not\n\tpop"
207 do
208   ./make_unary_test.sh not_1 invalid "$OP" float64
209   ./make_unary_test.sh not_2 invalid "$OP" 'int32&'
210   ./make_unary_test.sh not_3 invalid "$OP" object
211 done
212
213 # Table 6: Shift Operators
214 I=1
215 for OP in shl shr
216 do
217   ./make_bin_test.sh shift_op_1_${I} invalid $OP int32 int64
218   ./make_bin_test.sh shift_op_2_${I} invalid $OP int32 float64
219   ./make_bin_test.sh shift_op_3_${I} invalid $OP int32 'int32&'
220   ./make_bin_test.sh shift_op_4_${I} invalid $OP int32 object
221
222   ./make_bin_test.sh shift_op_5_${I} invalid $OP int64 int64
223   ./make_bin_test.sh shift_op_6_${I} invalid $OP int64 float64
224   ./make_bin_test.sh shift_op_7_${I} invalid $OP int64 'int32&'
225   ./make_bin_test.sh shift_op_8_${I} invalid $OP int64 object
226
227   ./make_bin_test.sh shift_op_9_${I} invalid $OP 'native int' int64
228   ./make_bin_test.sh shift_op_10_${I} invalid $OP 'native int' float64
229   ./make_bin_test.sh shift_op_11_${I} invalid $OP 'native int' 'native int&'
230   ./make_bin_test.sh shift_op_12_${I} invalid $OP 'native int' object
231
232   ./make_bin_test.sh shift_op_13_${I} invalid $OP float64 int32
233   ./make_bin_test.sh shift_op_14_${I} invalid $OP float64 int64
234   ./make_bin_test.sh shift_op_15_${I} invalid $OP float64 'native int'
235   ./make_bin_test.sh shift_op_16_${I} invalid $OP float64 float64
236   ./make_bin_test.sh shift_op_17_${I} invalid $OP float64 'int32&'
237   ./make_bin_test.sh shift_op_18_${I} invalid $OP float64 object
238
239   ./make_bin_test.sh shift_op_19_${I} invalid $OP 'int32&' int32
240   ./make_bin_test.sh shift_op_20_${I} invalid $OP 'int64&' int64
241   ./make_bin_test.sh shift_op_21_${I} invalid $OP 'native int&' 'native int'
242   ./make_bin_test.sh shift_op_22_${I} invalid $OP 'float64&' float64
243   ./make_bin_test.sh shift_op_23_${I} invalid $OP 'int32&' 'int32&'
244   ./make_bin_test.sh shift_op_24_${I} invalid $OP 'float64&' object
245
246   ./make_bin_test.sh shift_op_25_${I} invalid $OP object int32
247   ./make_bin_test.sh shift_op_26_${I} invalid $OP object int64
248   ./make_bin_test.sh shift_op_27_${I} invalid $OP object 'native int'
249   ./make_bin_test.sh shift_op_28_${I} invalid $OP object float64
250   ./make_bin_test.sh shift_op_29_${I} invalid $OP object 'int32&'
251   ./make_bin_test.sh shift_op_30_${I} invalid $OP object object
252   I=`expr $I + 1`
253 done
254
255 # Table 8: Conversion Operations
256 I=1
257 for OP in "conv.i4\n\tpop" "conv.r8\n\tpop"
258 do
259   ./make_unary_test.sh conv_op_1_${I} invalid $OP 'int32&'
260   ./make_unary_test.sh conv_op_2_${I} invalid $OP object
261   I=`expr $I + 1`
262 done
263
264 #local and argument store with invalid values lead to unverifiable code
265 I=1
266 for OP in stloc.0 "stloc.s 0" "starg 0" "starg.s 0"
267 do
268   ./make_store_test.sh coercion_1_${I} unverifiable "$OP" int8 int64
269   ./make_store_test.sh coercion_2_${I} unverifiable "$OP" int8 float64
270   ./make_store_test.sh coercion_3_${I} unverifiable "$OP" int8 'int8&'
271   ./make_store_test.sh coercion_4_${I} unverifiable "$OP" int8 object
272
273   ./make_store_test.sh coercion_5_${I} unverifiable "$OP" 'unsigned int8' int64
274   ./make_store_test.sh coercion_6_${I} unverifiable "$OP" 'unsigned int8' float64
275   ./make_store_test.sh coercion_7_${I} unverifiable "$OP" 'unsigned int8' 'unsigned int8&'
276   ./make_store_test.sh coercion_8_${I} unverifiable "$OP" 'unsigned int8' object
277
278   ./make_store_test.sh coercion_9_${I} unverifiable "$OP" bool int64
279   ./make_store_test.sh coercion_10_${I} unverifiable "$OP" bool float64
280   ./make_store_test.sh coercion_11_${I} unverifiable "$OP" bool 'bool&'
281   ./make_store_test.sh coercion_12_${I} unverifiable "$OP" bool object
282
283   ./make_store_test.sh coercion_13_${I} unverifiable "$OP" int16 int64
284   ./make_store_test.sh coercion_14_${I} unverifiable "$OP" int16 float64
285   ./make_store_test.sh coercion_15_${I} unverifiable "$OP" int16 'int16&'
286   ./make_store_test.sh coercion_16_${I} unverifiable "$OP" int16 object
287   
288   ./make_store_test.sh coercion_17_${I} unverifiable "$OP" 'unsigned int16' int64
289   ./make_store_test.sh coercion_18_${I} unverifiable "$OP" 'unsigned int16' float64
290   ./make_store_test.sh coercion_19_${I} unverifiable "$OP" 'unsigned int16' 'unsigned int16&'
291   ./make_store_test.sh coercion_20_${I} unverifiable "$OP" 'unsigned int16' object
292   
293   ./make_store_test.sh coercion_21_${I} unverifiable "$OP" char int64
294   ./make_store_test.sh coercion_22_${I} unverifiable "$OP" char float64
295   ./make_store_test.sh coercion_23_${I} unverifiable "$OP" char 'char&'
296   ./make_store_test.sh coercion_24_${I} unverifiable "$OP" char object
297   
298   ./make_store_test.sh coercion_25_${I} unverifiable "$OP" int32 int64
299   ./make_store_test.sh coercion_26_${I} unverifiable "$OP" int32 float64
300   ./make_store_test.sh coercion_27_${I} unverifiable "$OP" int32 'int32&'
301   ./make_store_test.sh coercion_28_${I} unverifiable "$OP" int32 object
302   
303   ./make_store_test.sh coercion_29_${I} unverifiable "$OP" 'unsigned int32' int64
304   ./make_store_test.sh coercion_30_${I} unverifiable "$OP" 'unsigned int32' float64
305   ./make_store_test.sh coercion_31_${I} unverifiable "$OP" 'unsigned int32' 'unsigned int32&'
306   ./make_store_test.sh coercion_32_${I} unverifiable "$OP" 'unsigned int32' object
307  
308   ./make_store_test.sh coercion_33_${I} unverifiable "$OP" int64 int32
309   ./make_store_test.sh coercion_34_${I} unverifiable "$OP" int64 'native int'
310   ./make_store_test.sh coercion_35_${I} unverifiable "$OP" int64 float64
311   ./make_store_test.sh coercion_36_${I} unverifiable "$OP" int64 'int64&'
312   ./make_store_test.sh coercion_37_${I} unverifiable "$OP" int64 object
313   
314   ./make_store_test.sh coercion_38_${I} unverifiable "$OP" 'unsigned int64' int32
315   ./make_store_test.sh coercion_39_${I} unverifiable "$OP" 'unsigned int64' 'native int'
316   ./make_store_test.sh coercion_40_${I} unverifiable "$OP" 'unsigned int64' float64
317   ./make_store_test.sh coercion_41_${I} unverifiable "$OP" 'unsigned int64' 'unsigned int64&'
318   ./make_store_test.sh coercion_42_${I} unverifiable "$OP" 'unsigned int64' object
319   
320   ./make_store_test.sh coercion_43_${I} unverifiable "$OP" 'native int' int64
321   ./make_store_test.sh coercion_44_${I} unverifiable "$OP" 'native int' float64
322   ./make_store_test.sh coercion_45_${I} unverifiable "$OP" 'native int' 'native int&'
323   ./make_store_test.sh coercion_46_${I} unverifiable "$OP" 'native int' object
324   
325   ./make_store_test.sh coercion_47_${I} unverifiable "$OP" 'native unsigned int' int64
326   ./make_store_test.sh coercion_48_${I} unverifiable "$OP" 'native unsigned int' float64
327   ./make_store_test.sh coercion_49_${I} unverifiable "$OP" 'native unsigned int' 'native unsigned int&'
328   ./make_store_test.sh coercion_50_${I} unverifiable "$OP" 'native unsigned int' object
329   
330   ./make_store_test.sh coercion_51_${I} unverifiable "$OP" float32 int32
331   ./make_store_test.sh coercion_52_${I} unverifiable "$OP" float32 'native int'
332   ./make_store_test.sh coercion_53_${I} unverifiable "$OP" float32 int64
333   ./make_store_test.sh coercion_54_${I} unverifiable "$OP" float32 'float32&'
334   ./make_store_test.sh coercion_55_${I} unverifiable "$OP" float32 object
335   
336   ./make_store_test.sh coercion_56_${I} unverifiable "$OP" float64 int32
337   ./make_store_test.sh coercion_57_${I} unverifiable "$OP" float64 'native int'
338   ./make_store_test.sh coercion_58_${I} unverifiable "$OP" float64 int64
339   ./make_store_test.sh coercion_59_${I} unverifiable "$OP" float64 'float64&'
340   ./make_store_test.sh coercion_60_${I} unverifiable "$OP" float64 object
341
342   ./make_store_test.sh coercion_61_${I} unverifiable "$OP" object int32
343   ./make_store_test.sh coercion_62_${I} unverifiable "$OP" object 'native int'
344   ./make_store_test.sh coercion_63_${I} unverifiable "$OP" object int64
345   ./make_store_test.sh coercion_64_${I} unverifiable "$OP" object float64
346   ./make_store_test.sh coercion_65_${I} unverifiable "$OP" object 'object&'
347   
348   ./make_store_test.sh coercion_66_${I} unverifiable "$OP" 'class ValueType' int32
349   ./make_store_test.sh coercion_67_${I} unverifiable "$OP" 'class ValueType' 'native int'
350   ./make_store_test.sh coercion_68_${I} unverifiable "$OP" 'class ValueType' int64
351   ./make_store_test.sh coercion_69_${I} unverifiable "$OP" 'class ValueType' float64
352   ./make_store_test.sh coercion_70_${I} unverifiable "$OP" 'class ValueType' 'class ValueType&'
353   ./make_store_test.sh coercion_71_${I} unverifiable "$OP" 'class ValueType' object
354   
355   ./make_store_test.sh coercion_72_${I} unverifiable "$OP" 'int32&' int32
356   ./make_store_test.sh coercion_73_${I} unverifiable "$OP" 'int32&' 'native int'
357   ./make_store_test.sh coercion_74_${I} unverifiable "$OP" 'int32&' int64
358   ./make_store_test.sh coercion_75_${I} unverifiable "$OP" 'int32&' float64
359   ./make_store_test.sh coercion_76_${I} unverifiable "$OP" 'int32&' object
360   
361   ./make_store_test.sh coercion_77_${I} unverifiable "$OP" typedref int32
362   ./make_store_test.sh coercion_78_${I} unverifiable "$OP" typedref 'native int'
363   ./make_store_test.sh coercion_89_${I} unverifiable "$OP" typedref int64
364   ./make_store_test.sh coercion_80_${I} unverifiable "$OP" typedref float64
365   ./make_store_test.sh coercion_81_${I} unverifiable "$OP" typedref 'typedref&'
366   ./make_store_test.sh coercion_82_${I} unverifiable "$OP" typedref object
367   I=`expr $I + 1`
368 done
369
370 #Field store parameter compatibility leads to invalid code
371 #Calling method with diferent verification types on stack lead to invalid code
372 I=1
373 for OP in "stfld TYPE1 Class::fld" "stsfld TYPE1 Class::sfld\n\tpop"  "call void Class::Method(TYPE1)"
374 do
375   ./make_obj_store_test.sh obj_coercion_1_${I} invalid "$OP" int8 int64
376   ./make_obj_store_test.sh obj_coercion_2_${I} invalid "$OP" int8 float64
377   ./make_obj_store_test.sh obj_coercion_3_${I} invalid "$OP" int8 'int8&'
378   ./make_obj_store_test.sh obj_coercion_4_${I} invalid "$OP" int8 object
379
380   ./make_obj_store_test.sh obj_coercion_5_${I} invalid "$OP" 'unsigned int8' int64
381   ./make_obj_store_test.sh obj_coercion_6_${I} invalid "$OP" 'unsigned int8' float64
382   ./make_obj_store_test.sh obj_coercion_7_${I} invalid "$OP" 'unsigned int8' 'unsigned int8&'
383   ./make_obj_store_test.sh obj_coercion_8_${I} invalid "$OP" 'unsigned int8' object
384
385   ./make_obj_store_test.sh obj_coercion_9_${I} invalid "$OP" bool int64
386   ./make_obj_store_test.sh obj_coercion_10_${I} invalid "$OP" bool float64
387   ./make_obj_store_test.sh obj_coercion_11_${I} invalid "$OP" bool 'bool&'
388   ./make_obj_store_test.sh obj_coercion_12_${I} invalid "$OP" bool object
389
390   ./make_obj_store_test.sh obj_coercion_13_${I} invalid "$OP" int16 int64
391   ./make_obj_store_test.sh obj_coercion_14_${I} invalid "$OP" int16 float64
392   ./make_obj_store_test.sh obj_coercion_15_${I} invalid "$OP" int16 'int16&'
393   ./make_obj_store_test.sh obj_coercion_16_${I} invalid "$OP" int16 object
394   
395   ./make_obj_store_test.sh obj_coercion_17_${I} invalid "$OP" 'unsigned int16' int64
396   ./make_obj_store_test.sh obj_coercion_18_${I} invalid "$OP" 'unsigned int16' float64
397   ./make_obj_store_test.sh obj_coercion_19_${I} invalid "$OP" 'unsigned int16' 'unsigned int16&'
398   ./make_obj_store_test.sh obj_coercion_20_${I} invalid "$OP" 'unsigned int16' object
399   
400   ./make_obj_store_test.sh obj_coercion_21_${I} invalid "$OP" char int64
401   ./make_obj_store_test.sh obj_coercion_22_${I} invalid "$OP" char float64
402   ./make_obj_store_test.sh obj_coercion_23_${I} invalid "$OP" char 'char&'
403   ./make_obj_store_test.sh obj_coercion_24_${I} invalid "$OP" char object
404   
405   ./make_obj_store_test.sh obj_coercion_25_${I} invalid "$OP" int32 int64
406   ./make_obj_store_test.sh obj_coercion_26_${I} invalid "$OP" int32 float64
407   ./make_obj_store_test.sh obj_coercion_27_${I} invalid "$OP" int32 'int32&'
408   ./make_obj_store_test.sh obj_coercion_28_${I} invalid "$OP" int32 object
409   
410   ./make_obj_store_test.sh obj_coercion_29_${I} invalid "$OP" 'unsigned int32' int64
411   ./make_obj_store_test.sh obj_coercion_30_${I} invalid "$OP" 'unsigned int32' float64
412   ./make_obj_store_test.sh obj_coercion_31_${I} invalid "$OP" 'unsigned int32' 'unsigned int32&'
413   ./make_obj_store_test.sh obj_coercion_32_${I} invalid "$OP" 'unsigned int32' object
414  
415   ./make_obj_store_test.sh obj_coercion_33_${I} invalid "$OP" int64 int32
416   ./make_obj_store_test.sh obj_coercion_34_${I} invalid "$OP" int64 'native int'
417   ./make_obj_store_test.sh obj_coercion_35_${I} invalid "$OP" int64 float64
418   ./make_obj_store_test.sh obj_coercion_36_${I} invalid "$OP" int64 'int64&'
419   ./make_obj_store_test.sh obj_coercion_37_${I} invalid "$OP" int64 object
420   
421   ./make_obj_store_test.sh obj_coercion_38_${I} invalid "$OP" 'unsigned int64' int32
422   ./make_obj_store_test.sh obj_coercion_39_${I} invalid "$OP" 'unsigned int64' 'native int'
423   ./make_obj_store_test.sh obj_coercion_40_${I} invalid "$OP" 'unsigned int64' float64
424   ./make_obj_store_test.sh obj_coercion_41_${I} invalid "$OP" 'unsigned int64' 'unsigned int64&'
425   ./make_obj_store_test.sh obj_coercion_42_${I} invalid "$OP" 'unsigned int64' object
426   
427   ./make_obj_store_test.sh obj_coercion_43_${I} invalid "$OP" 'native int' int64
428   ./make_obj_store_test.sh obj_coercion_44_${I} invalid "$OP" 'native int' float64
429   ./make_obj_store_test.sh obj_coercion_45_${I} invalid "$OP" 'native int' 'native int&'
430   ./make_obj_store_test.sh obj_coercion_46_${I} invalid "$OP" 'native int' object
431   
432   ./make_obj_store_test.sh obj_coercion_47_${I} invalid "$OP" 'native unsigned int' int64
433   ./make_obj_store_test.sh obj_coercion_48_${I} invalid "$OP" 'native unsigned int' float64
434   ./make_obj_store_test.sh obj_coercion_49_${I} invalid "$OP" 'native unsigned int' 'native unsigned int&'
435   ./make_obj_store_test.sh obj_coercion_50_${I} invalid "$OP" 'native unsigned int' object
436   
437   ./make_obj_store_test.sh obj_coercion_51_${I} invalid "$OP" float32 int32
438   ./make_obj_store_test.sh obj_coercion_52_${I} invalid "$OP" float32 'native int'
439   ./make_obj_store_test.sh obj_coercion_53_${I} invalid "$OP" float32 int64
440   ./make_obj_store_test.sh obj_coercion_54_${I} invalid "$OP" float32 'float32&'
441   ./make_obj_store_test.sh obj_coercion_55_${I} invalid "$OP" float32 object
442   
443   ./make_obj_store_test.sh obj_coercion_56_${I} invalid "$OP" float64 int32
444   ./make_obj_store_test.sh obj_coercion_57_${I} invalid "$OP" float64 'native int'
445   ./make_obj_store_test.sh obj_coercion_58_${I} invalid "$OP" float64 int64
446   ./make_obj_store_test.sh obj_coercion_59_${I} invalid "$OP" float64 'float64&'
447   ./make_obj_store_test.sh obj_coercion_60_${I} invalid "$OP" float64 object
448
449   ./make_obj_store_test.sh obj_coercion_61_${I} invalid "$OP" object int32
450   ./make_obj_store_test.sh obj_coercion_62_${I} invalid "$OP" object 'native int'
451   ./make_obj_store_test.sh obj_coercion_63_${I} invalid "$OP" object int64
452   ./make_obj_store_test.sh obj_coercion_64_${I} invalid "$OP" object float64
453   ./make_obj_store_test.sh obj_coercion_65_${I} invalid "$OP" object 'object&'
454   
455   ./make_obj_store_test.sh obj_coercion_66_${I} invalid "$OP" 'class ValueType' int32
456   ./make_obj_store_test.sh obj_coercion_67_${I} invalid "$OP" 'class ValueType' 'native int'
457   ./make_obj_store_test.sh obj_coercion_68_${I} invalid "$OP" 'class ValueType' int64
458   ./make_obj_store_test.sh obj_coercion_69_${I} invalid "$OP" 'class ValueType' float64
459   ./make_obj_store_test.sh obj_coercion_70_${I} invalid "$OP" 'class ValueType' 'class ValueType&'
460   ./make_obj_store_test.sh obj_coercion_71_${I} invalid "$OP" 'class ValueType' object
461   
462   
463   #These tests don't test store error since one cannot have an 'int32&' field
464   #They should exist in the structural tests session
465   #./make_obj_store_test.sh obj_coercion_72_${I} invalid "$OP" 'int32&' int32
466   #./make_obj_store_test.sh obj_coercion_73_${I} invalid "$OP" 'int32&' 'native int'
467   #./make_obj_store_test.sh obj_coercion_74_${I} invalid "$OP" 'int32&' int64
468   #./make_obj_store_test.sh obj_coercion_75_${I} invalid "$OP" 'int32&' float64
469   #./make_obj_store_test.sh obj_coercion_76_${I} invalid "$OP" 'int32&' object
470   
471   ./make_obj_store_test.sh obj_coercion_77_${I} invalid "$OP" typedref int32
472   ./make_obj_store_test.sh obj_coercion_78_${I} invalid "$OP" typedref 'native int'
473   ./make_obj_store_test.sh obj_coercion_79_${I} invalid "$OP" typedref int64
474   ./make_obj_store_test.sh obj_coercion_80_${I} invalid "$OP" typedref float64
475   ./make_obj_store_test.sh obj_coercion_81_${I} invalid "$OP" typedref 'typedref&'
476   ./make_obj_store_test.sh obj_coercion_82_${I} invalid "$OP" typedref object
477   I=`expr $I + 1`
478 done
479
480 # 1.8.1.2.3 Verification type compatibility (Assignment compatibility)
481 I=1
482 for OP in stloc.0 "stloc.s 0" "starg.s 0"
483 do
484   # ClassB not subtype of ClassA.
485   ./make_store_test.sh assign_compat_1_${I} unverifiable "$OP" 'class ClassA' 'class ClassB'
486
487   # ClassA not interface type.
488   # FIXME: what was the purpoise of this test? on it's current for it is valid and not unverifiable
489   ./make_store_test.sh assign_compat_3_${I} valid "$OP" object 'class ClassA'
490   
491   # Implementation of InterfaceB does not require the implementation of InterfaceA
492   ./make_store_test.sh assign_compat_4_${I} unverifiable "$OP" 'class InterfaceA' 'class InterfaceB'
493
494   # Array/vector.
495   ./make_store_test.sh assign_compat_5_${I} unverifiable "$OP" 'string []' 'string[,]'
496
497   # Vector/array.
498   ./make_store_test.sh assign_compat_6_${I} unverifiable "$OP" 'string [,]' 'string[]'
499
500   # Arrays with different rank.
501   ./make_store_test.sh assign_compat_7_${I} unverifiable "$OP" 'string [,]' 'string[,,]'
502
503   # Method pointers with different return types.
504   ./make_store_test.sh assign_compat_8_${I} unverifiable "$OP" 'method int32 *(int32)' 'method float32 *(int32)'
505
506   # Method pointers with different parameters.
507   ./make_store_test.sh assign_compat_9_${I} unverifiable "$OP" 'method int32 *(float64)' 'method int32 *(int32)'
508
509   # Method pointers with different calling conventions.
510   ./make_store_test.sh assign_compat_10_${I} unverifiable "$OP" 'method vararg int32 *(int32)' 'method int32 *(int32)'
511   I=`expr $I + 1`
512 done
513
514 for OP in "stfld TYPE1 Class::fld" "stsfld TYPE1 Class::sfld\n\tpop"  "call void Class::Method(TYPE1)"
515 do
516   # ClassB not subtype of ClassA.
517   ./make_obj_store_test.sh assign_compat_1_${I} invalid "$OP" 'class ClassA' 'class ClassB'
518
519   # ClassA not interface type.
520   #FIXME: this test is valid, you can store type ClassA in a object field
521   ./make_obj_store_test.sh assign_compat_3_${I} valid "$OP" object 'class ClassA'
522   
523   # Implementation of InterfaceB does not require the implementation of InterfaceA
524   ./make_obj_store_test.sh assign_compat_4_${I} invalid "$OP" 'class InterfaceA' 'class InterfaceB'
525
526   # Array/vector.
527   ./make_obj_store_test.sh assign_compat_5_${I} invalid "$OP" 'string []' 'string[,]'
528
529   # Vector/array.
530   ./make_obj_store_test.sh assign_compat_6_${I} invalid "$OP" 'string [,]' 'string[]'
531
532   # Arrays with different rank.
533   ./make_obj_store_test.sh assign_compat_7_${I} invalid "$OP" 'string [,]' 'string[,,]'
534
535   # Method pointers with different return types.
536   ./make_obj_store_test.sh assign_compat_8_${I} invalid "$OP" 'method int32 *(int32)' 'method float32 *(int32)'
537
538   # Method pointers with different parameters.
539   ./make_obj_store_test.sh assign_compat_9_${I} invalid "$OP" 'method int32 *(float64)' 'method int32 *(int32)'
540
541   # Method pointers with different calling conventions.
542   ./make_obj_store_test.sh assign_compat_10_${I} invalid "$OP" 'method vararg int32 *(int32)' 'method int32 *(int32)'
543   I=`expr $I + 1`
544 done
545
546 # 1.8.1.3 Merging stack states
547 I=1
548 for TYPE1 in int32 int64 'native int' float64 'valuetype ValueType' 'class Class' 'int8&' 'int16&' 'int32&' 'int64&' 'native int&' 'float32&' 'float64&' 'valuetype ValueType&' 'class Class&' 'method int32 *(int32)' 'method float32 *(int32)' 'method int32 *(float64)' 'method vararg int32 *(int32)'
549 do
550   for TYPE2 in int32 int64 'native int' float64 'valuetype ValueType' 'class Class' 'int8&' 'int16&' 'int32&' 'int64&' 'native int&' 'float32&' 'float64&' 'valuetype ValueType&' 'class Class&' 'method int32 *(int32)' 'method float32 *(int32)' 'method int32 *(float64)' 'method vararg int32 *(int32)'
551   do
552         ZZ=`echo $TYPE1 | grep "*";`
553         T1_PTR=$?
554         ZZ=`echo $TYPE2 | grep "*";`
555         T2_PTR=$?
556         
557     if (($T1_PTR == 0  ||  $T2_PTR == 0)); then
558                 ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
559     elif [ "$TYPE1" == "$TYPE2" ]; then
560                 ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
561         elif [ "$TYPE1" == "int32" ] && [ "$TYPE2" == "native int" ]; then
562                 ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
563         elif [ "$TYPE1" == "native int" ] && [ "$TYPE2" == "int32" ]; then
564                 ./make_stack_merge_test.sh stack_merge_${I} valid "$TYPE1" "$TYPE2"
565         else
566                 ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
567     fi
568         I=`expr $I + 1`
569   done
570 done
571
572 # Unverifiable array stack merges
573
574 # These are verifiable, the merged type is 'object' or 'Array'
575 #for TYPE1 in 'string []' 'string [,]' 'string [,,]' 
576 #do
577 #  for TYPE2 in 'string []' 'string [,]' 'string [,,]' 
578 #  do
579 #    if [ "$TYPE1" != "$TYPE2" ]; then
580 #       ./make_stack_merge_test.sh stack_merge_${I} unverifiable "$TYPE1" "$TYPE2"
581 #       I=`expr $I + 1`
582 #    fi
583 #  done
584 #done
585
586 # Exception block branch tests (see 3.15)
587 I=1
588 for OP in br "ldc.i4.0\n\tbrfalse"
589 do
590   ./make_exception_branch_test.sh in_try_${I} "$OP branch_target1"
591   ./make_exception_branch_test.sh in_catch_${I} "$OP branch_target2"
592   ./make_exception_branch_test.sh in_finally_${I} "$OP branch_target3"
593   ./make_exception_branch_test.sh in_filter_${I} "$OP branch_target4"
594   ./make_exception_branch_test.sh out_try_${I} "" "$OP branch_target5"
595   ./make_exception_branch_test.sh out_catch_${I} "" "" "$OP branch_target5"
596   ./make_exception_branch_test.sh out_finally_${I} "" "" "" "$OP branch_target5"
597   ./make_exception_branch_test.sh out_filter_${I} "" "" "" "" "$OP branch_target5"
598   I=`expr $I + 1`
599 done
600
601 ./make_exception_branch_test.sh ret_out_try "" "ldc.i4.0\n\tret"
602 ./make_exception_branch_test.sh ret_out_catch "" "" "ldc.i4.0\n\tret"
603 ./make_exception_branch_test.sh ret_out_finally "" "" "" "ldc.i4.0\n\tret"
604 ./make_exception_branch_test.sh ret_out_filter "" "" "" "" "ldc.i4.0\n\tret"
605
606 # Unary branch op type tests (see 3.17)
607
608 for OP in brfalse
609 do
610   ./make_unary_test.sh un_branch_op invalid "$OP branch_target" float64
611 done
612
613 # Ldloc.0 and Ldarg tests (see 3.38)
614
615 I=1
616 for OP in "ldarg.s 0" "ldarg.0" "ldarga.s 0" "ldloc.s 1" "ldloca.s 1"
617 do
618   ./make_unary_test.sh ld_no_slot_${I} invalid "pop\n\t$OP\n\tpop" int32
619   I=`expr $I + 1`
620 done
621
622 # Starg and Stloc tests (see 3.61)
623
624 I=1
625 for OP in "starg.s 0" "stloc.s 1"
626 do
627   ./make_unary_test.sh st_no_slot_${I} invalid "$OP" int32
628   I=`expr $I + 1`
629 done
630
631 # Ldfld and Ldflda tests (see 4.10)
632
633 for OP in ldfld ldflda
634 do
635   ./make_unary_test.sh ${OP}_no_fld invalid "$OP int32 Class::invalid\n\tpop" "class Class"
636   ./make_unary_test.sh ${OP}_bad_obj invalid "$OP int32 Class::valid\n\tpop" object
637   ./make_unary_test.sh ${OP}_obj_int32 invalid "$OP int32 Class::valid\n\tpop" int32
638   ./make_unary_test.sh ${OP}_obj_int64 invalid "$OP int32 Class::valid\n\tpop" int64
639   ./make_unary_test.sh ${OP}_obj_float64 invalid "$OP int32 Class::valid\n\tpop" float64
640   ./make_unary_test.sh ${OP}_obj_native_int unverifiable "$OP int32 Class::valid\n\tpop" 'native int'
641   ./make_unary_test.sh ${OP}_obj_native_int unverifiable "$OP object Overlapped::objVal\n\tpop" "class Overlapped"
642   ./make_unary_test.sh ${OP}_obj_native_int unverifiable "$OP int32 Overlapped::publicIntVal\n\tpop" "class Overlapped"
643 done
644
645 # Stfld tests (see 4.28)
646
647 ./make_unary_test.sh stfld_no_fld invalid "ldc.i4.0\n\tstfld int32 Class::invalid" "class Class"
648 ./make_unary_test.sh stfld_bad_obj invalid "ldc.i4.0\n\tstfld int32 Class::valid" object
649 ./make_unary_test.sh stfld_obj_int32 invalid "ldc.i4.0\n\tstfld int32 Class::valid" int32
650 ./make_unary_test.sh stfld_obj_int64 invalid "ldc.i4.0\n\tstfld int32 Class::valid" int64
651 ./make_unary_test.sh stfld_obj_float64 invalid "ldc.i4.0\n\tstfld int32 Class::valid" float64
652 ./make_unary_test.sh stfld_no_int invalid "stfld int32 Class::valid" "class Class"
653 ./make_unary_test.sh stfld_obj_native_int unverifiable "ldc.i4.0\n\tstfld int32 Class::valid" 'native int'
654
655 # Box tests (see 4.1)
656
657 # Box non-existent type.
658 ./make_unary_test.sh box_bad_type unverifiable "box valuetype NonExistent\n\tpop" "valuetype NonExistent"
659
660 # Top of stack not assignment compatible with typeToc.
661 ./make_unary_test.sh box_not_compat unverifiable "box [mscorlib]System.Int32\n\tpop" float32
662
663 # Box byref type.
664 ./make_unary_test.sh box_byref unverifiable "box [mscorlib]System.Int32\&\n\tpop" 'int32&'
665
666 # Box byref-like type.
667 ./make_unary_test.sh box_byref_like unverifiable "box [mscorlib]System.TypedRefrence\n\tpop" typedref
668
669 #This is is illegal since you cannot have a Void local variable, it should go into the structural tests part
670 # Box void type.
671 #./make_unary_test.sh box_void unverifiable "box [mscorlib]System.Void\n\tpop" "class [mscorlib]System.Void"
672
673
674
675
676
677 ./make_ret_test.sh ret_coercion_1 unverifiable int8 int64
678 ./make_ret_test.sh ret_coercion_2 unverifiable int8 float64
679 ./make_ret_test.sh ret_coercion_3 unverifiable int8 'int8&'
680 ./make_ret_test.sh ret_coercion_4 unverifiable int8 object
681
682 ./make_ret_test.sh ret_coercion_5 unverifiable 'unsigned int8' int64
683 ./make_ret_test.sh ret_coercion_6 unverifiable 'unsigned int8' float64
684 ./make_ret_test.sh ret_coercion_6 unverifiable 'unsigned int8' float64
685 ./make_ret_test.sh ret_coercion_6 unverifiable 'unsigned int8' float64
686 ./make_ret_test.sh ret_coercion_7 unverifiable 'unsigned int8' 'unsigned int8&'
687 ./make_ret_test.sh ret_coercion_8 unverifiable 'unsigned int8' object
688
689 ./make_ret_test.sh ret_coercion_9 unverifiable bool int64
690 ./make_ret_test.sh ret_coercion_10 unverifiable bool float64
691 ./make_ret_test.sh ret_coercion_11 unverifiable bool 'bool&'
692 ./make_ret_test.sh ret_coercion_12 unverifiable bool object
693
694 ./make_ret_test.sh ret_coercion_13 unverifiable int16 int64
695 ./make_ret_test.sh ret_coercion_14 unverifiable int16 float64
696 ./make_ret_test.sh ret_coercion_15 unverifiable int16 'int16&'
697 ./make_ret_test.sh ret_coercion_16 unverifiable int16 object
698   
699 ./make_ret_test.sh ret_coercion_17 unverifiable 'unsigned int16' int64
700 ./make_ret_test.sh ret_coercion_18 unverifiable 'unsigned int16' float64
701 ./make_ret_test.sh ret_coercion_19 unverifiable 'unsigned int16' 'unsigned int16&'
702 ./make_ret_test.sh ret_coercion_20 unverifiable 'unsigned int16' object
703   
704 ./make_ret_test.sh ret_coercion_21 unverifiable char int64
705 ./make_ret_test.sh ret_coercion_22 unverifiable char float64
706 ./make_ret_test.sh ret_coercion_23 unverifiable char 'char&'
707 ./make_ret_test.sh ret_coercion_24 unverifiable char object
708   
709 ./make_ret_test.sh ret_coercion_25 unverifiable int32 int64
710 ./make_ret_test.sh ret_coercion_26 unverifiable int32 float64
711 ./make_ret_test.sh ret_coercion_27 unverifiable int32 'int32&'
712 ./make_ret_test.sh ret_coercion_28 unverifiable int32 object
713   
714 ./make_ret_test.sh ret_coercion_29 unverifiable 'unsigned int32' int64
715 ./make_ret_test.sh ret_coercion_30 unverifiable 'unsigned int32' float64
716 ./make_ret_test.sh ret_coercion_31 unverifiable 'unsigned int32' 'unsigned int32&'
717 ./make_ret_test.sh ret_coercion_32 unverifiable 'unsigned int32' object
718  
719 ./make_ret_test.sh ret_coercion_33 unverifiable int64 int32
720 ./make_ret_test.sh ret_coercion_34 unverifiable int64 'native int'
721 ./make_ret_test.sh ret_coercion_35 unverifiable int64 float64
722 ./make_ret_test.sh ret_coercion_36 unverifiable int64 'int64&'
723 ./make_ret_test.sh ret_coercion_37 unverifiable int64 object
724   
725 ./make_ret_test.sh ret_coercion_38 unverifiable 'unsigned int64' int32
726 ./make_ret_test.sh ret_coercion_39 unverifiable 'unsigned int64' 'native int'
727 ./make_ret_test.sh ret_coercion_40 unverifiable 'unsigned int64' float64
728 ./make_ret_test.sh ret_coercion_41 unverifiable 'unsigned int64' 'unsigned int64&'
729 ./make_ret_test.sh ret_coercion_42 unverifiable 'unsigned int64' object
730   
731 ./make_ret_test.sh ret_coercion_43 unverifiable 'native int' int64
732 ./make_ret_test.sh ret_coercion_44 unverifiable 'native int' float64
733 ./make_ret_test.sh ret_coercion_45 unverifiable 'native int' 'native int&'
734 ./make_ret_test.sh ret_coercion_46 unverifiable 'native int' object
735   
736 ./make_ret_test.sh ret_coercion_47 unverifiable 'native unsigned int' int64
737 ./make_ret_test.sh ret_coercion_48 unverifiable 'native unsigned int' float64
738 ./make_ret_test.sh ret_coercion_49 unverifiable 'native unsigned int' 'native unsigned int&'
739 ./make_ret_test.sh ret_coercion_50 unverifiable 'native unsigned int' object
740   
741 ./make_ret_test.sh ret_coercion_51 unverifiable float32 int32
742 ./make_ret_test.sh ret_coercion_52 unverifiable float32 'native int'
743 ./make_ret_test.sh ret_coercion_53 unverifiable float32 int64
744 ./make_ret_test.sh ret_coercion_54 unverifiable float32 'float32&'
745 ./make_ret_test.sh ret_coercion_55 unverifiable float32 object
746   
747 ./make_ret_test.sh ret_coercion_56 unverifiable float64 int32
748 ./make_ret_test.sh ret_coercion_57 unverifiable float64 'native int'
749 ./make_ret_test.sh ret_coercion_58 unverifiable float64 int64
750 ./make_ret_test.sh ret_coercion_59 unverifiable float64 'float64&'
751 ./make_ret_test.sh ret_coercion_60 unverifiable float64 object
752
753 ./make_ret_test.sh ret_coercion_61 unverifiable object int32
754 ./make_ret_test.sh ret_coercion_62 unverifiable object 'native int'
755 ./make_ret_test.sh ret_coercion_63 unverifiable object int64
756 ./make_ret_test.sh ret_coercion_64 unverifiable object float64
757 ./make_ret_test.sh ret_coercion_65 unverifiable object 'object&'
758   
759 ./make_ret_test.sh ret_coercion_66 unverifiable 'class MyValueType' int32
760 ./make_ret_test.sh ret_coercion_67 unverifiable 'class MyValueType' 'native int'
761 ./make_ret_test.sh ret_coercion_68 unverifiable 'class MyValueType' int64
762 ./make_ret_test.sh ret_coercion_69 unverifiable 'class MyValueType' float64
763 ./make_ret_test.sh ret_coercion_70 unverifiable 'class MyValueType' 'class MyValueType&'
764 ./make_ret_test.sh ret_coercion_71 unverifiable 'class MyValueType' object
765   
766 ./make_ret_test.sh ret_coercion_72 unverifiable 'int32&' int32
767 ./make_ret_test.sh ret_coercion_73 unverifiable 'int32&' 'native int'
768 ./make_ret_test.sh ret_coercion_74 unverifiable 'int32&' int64
769 ./make_ret_test.sh ret_coercion_75 unverifiable 'int32&' float64
770 ./make_ret_test.sh ret_coercion_76 unverifiable 'int32&' object
771   
772 ./make_ret_test.sh ret_coercion_77 unverifiable typedref int32
773 ./make_ret_test.sh ret_coercion_78 unverifiable typedref 'native int'
774 ./make_ret_test.sh ret_coercion_79 unverifiable typedref int64
775 ./make_ret_test.sh ret_coercion_80 unverifiable typedref float64
776 ./make_ret_test.sh ret_coercion_81 unverifiable typedref 'typedref&'
777 ./make_ret_test.sh ret_coercion_82 unverifiable typedref object
778
779
780 ./make_ret_test.sh ret_sub_type valid ClassA ClassSubA
781 ./make_ret_test.sh ret_same_type valid ClassA ClassA
782 ./make_ret_test.sh ret_obj_iface valid object InterfaceA
783 ./make_ret_test.sh ret_obj_obj valid object object
784 ./make_ret_test.sh ret_obj_string valid object string
785 ./make_ret_test.sh ret_string_string valid string string
786 ./make_ret_test.sh ret_obj_vector valid object 'int32[]'
787 ./make_ret_test.sh ret_obj_array valid object 'int32[,]'
788 ./make_ret_test.sh ret_obj_generic valid object 'class Template`1<object>'
789 ./make_ret_test.sh ret_obj_value_type unverifiable object 'MyValueType'
790 ./make_ret_test.sh ret_string_value_type unverifiable string 'MyValueType'
791 ./make_ret_test.sh ret_class_value_type unverifiable ClassA 'MyValueType'
792
793 ./make_ret_test.sh ret_string_string unverifiable string object
794 ./make_ret_test.sh ret_string_string unverifiable 'int32[]' object
795
796 ./make_ret_test.sh ret_iface_imple valid InterfaceA ImplA
797 ./make_ret_test.sh ret_arrays_same_vector valid 'int32[]' 'int32[]'
798 ./make_ret_test.sh ret_arrays_same_rank valid 'int32[,]' 'int32[,]'
799
800 ./make_ret_test.sh ret_sub_type_array_covariant valid 'ClassA[]' 'ClassSubA[]'
801 ./make_ret_test.sh ret_same_type_array_covariant valid 'ClassA[]' 'ClassA[]'
802 ./make_ret_test.sh ret_obj_iface_array_covariant valid 'object[]' 'InterfaceA[]'
803 ./make_ret_test.sh ret_iface_imple_array_covariant valid 'InterfaceA[]' 'ImplA[]'
804
805 ./make_ret_test.sh ret_diff_types unverifiable ClassA ClassB
806 ./make_ret_test.sh ret_class_vale_type unverifiable ClassA MyValueType
807 ./make_ret_test.sh ret_diff_vale_type unverifiable MyValueType2 MyValueType
808 ./make_ret_test.sh ret_value_type_class unverifiable MyValueType ClassA
809 ./make_ret_test.sh ret_super_type unverifiable ClassSubA ClassB
810 ./make_ret_test.sh ret_interfaces unverifiable InterfaceA InterfaceB
811 ./make_ret_test.sh ret_interface_class unverifiable ClassA InterfaceB
812
813 ./make_ret_test.sh ret_object_type valid object ClassA
814 ./make_ret_test.sh ret_type_object unverifiable ClassA object
815
816
817 ./make_ret_test.sh ret_array_diff_rank unverifiable 'int32[]' 'int32[,]'
818 ./make_ret_test.sh ret_array_diff_rank2 unverifiable 'int32[,]' 'int32[]'
819 ./make_ret_test.sh ret_array_diff_rank3 unverifiable 'int32[,,]' 'int32[,]'
820 ./make_ret_test.sh ret_array_not_covar unverifiable 'ClassA[]' 'ClassB[]'
821 ./make_ret_test.sh ret_array_not_covar2 unverifiable 'ClassSubA[]' 'ClassA[]'
822 ./make_ret_test.sh ret_array_not_covar3 unverifiable 'ClassA[]' 'InterfaceA[]'
823 ./make_ret_test.sh ret_array_not_covar4 unverifiable 'ImplA[]' 'InterfaceA[]'
824 ./make_ret_test.sh ret_array_not_covar5 unverifiable 'InterfaceA[]' 'object[]'
825
826
827 #generics tests
828 ./make_ret_test.sh ret_generics_1 valid 'class Template' 'class Template'
829 ./make_ret_test.sh ret_generics_2 valid 'class Template`1<int32>' 'class Template`1<int32>'
830 ./make_ret_test.sh ret_generics_3 valid 'class Template`2<int32,object>' 'class Template`2<int32,object>'
831
832 ./make_ret_test.sh ret_generics_4 unverifiable 'class Template' 'class Template`1<object>'
833 ./make_ret_test.sh ret_generics_5 unverifiable 'class Template`1<object>' 'class Template'
834 ./make_ret_test.sh ret_generics_6 unverifiable 'class Template`1<object>' 'class Template`1<string>'
835 ./make_ret_test.sh ret_generics_7 unverifiable 'class Template`1<string>' 'class Template`1<object>'
836 ./make_ret_test.sh ret_generics_8 unverifiable 'class Template`1<object>' 'class Template`2<object, object>'
837 ./make_ret_test.sh ret_generics_9 unverifiable 'class Template`2<object, object>' 'class Template`1<object>'
838
839 ./make_ret_test.sh ret_generics_10 unverifiable 'class Template`1<int32>' 'class Template`1<int16>'
840 ./make_ret_test.sh ret_generics_11 unverifiable 'class Template`1<int16>' 'class Template`1<int32>'
841 ./make_ret_test.sh ret_generics_12 unverifiable 'class Template`1<unsigned int32>' 'class Template`1<int32>'
842 ./make_ret_test.sh ret_generics_13 unverifiable 'class Template`1<float32>' 'class Template`1<float64>'
843 ./make_ret_test.sh ret_generics_14 unverifiable 'class Template`1<float64>' 'class Template`1<float32>'
844
845 #variance tests
846 ./make_ret_test.sh ret_generics_15 valid 'class ICovariant`1<object>' 'class ICovariant`1<string>'
847 ./make_ret_test.sh ret_generics_16 valid 'class ICovariant`1<string>' 'class ICovariant`1<string>'
848 ./make_ret_test.sh ret_generics_17 unverifiable 'class ICovariant`1<string>' 'class ICovariant`1<object>'
849
850 ./make_ret_test.sh ret_generics_18 valid 'class IContravariant`1<string>' 'class IContravariant`1<object>'
851 ./make_ret_test.sh ret_generics_19 valid 'class IContravariant`1<string>' 'class IContravariant`1<string>'
852 ./make_ret_test.sh ret_generics_20 unverifiable 'class IContravariant`1<object>' 'class IContravariant`1<string>'
853
854 ./make_ret_test.sh ret_generics_21 valid 'class ICovariant`1<ClassA>' 'class ICovariant`1<ClassSubA>'
855 ./make_ret_test.sh ret_generics_22 valid 'class ICovariant`1<ClassSubA>' 'class ICovariant`1<ClassSubA>'
856 ./make_ret_test.sh ret_generics_23 unverifiable 'class ICovariant`1<ClassSubA>' 'class ICovariant`1<ClassA>'
857
858 ./make_ret_test.sh ret_generics_24 valid 'class IContravariant`1<ClassSubA>' 'class IContravariant`1<ClassA>'
859 ./make_ret_test.sh ret_generics_25 valid 'class IContravariant`1<ClassSubA>' 'class IContravariant`1<ClassSubA>'
860 ./make_ret_test.sh ret_generics_26 unverifiable 'class IContravariant`1<ClassA>' 'class IContravariant`1<ClassSubA>'
861
862
863 ./make_ret_test.sh ret_generics_27 valid 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<ClassA, ClassB>'
864 ./make_ret_test.sh ret_generics_28 valid 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<ClassA, object>'
865 ./make_ret_test.sh ret_generics_29 valid 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<ClassSubA, ClassB>'
866 ./make_ret_test.sh ret_generics_30 valid 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<ClassSubA, object>'
867 ./make_ret_test.sh ret_generics_31 unverifiable 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<object, ClassB>'
868 ./make_ret_test.sh ret_generics_32 unverifiable 'class Bivariant`2<ClassA, ClassB>' 'class Bivariant`2<object, object>'
869 ./make_ret_test.sh ret_generics_33 unverifiable 'class Bivariant`2<ClassA, object>' 'class Bivariant`2<object, ClassB>'
870 ./make_ret_test.sh ret_generics_34 unverifiable 'class Bivariant`2<ClassA, object>' 'class Bivariant`2<ClassA, ClassB>'
871
872 #mix parameter types
873 ./make_ret_test.sh ret_generics_types_1 unverifiable 'class Template`1<int8>' 'class Template`1<unsigned int8>'
874 ./make_ret_test.sh ret_generics_types_2 unverifiable 'class Template`1<int8>' 'class Template`1<int16>'
875 ./make_ret_test.sh ret_generics_types_3 unverifiable 'class Template`1<int8>' 'class Template`1<unsigned int16>'
876 ./make_ret_test.sh ret_generics_types_4 unverifiable 'class Template`1<int8>' 'class Template`1<int32>'
877 ./make_ret_test.sh ret_generics_types_5 unverifiable 'class Template`1<int8>' 'class Template`1<unsigned int32>'
878 ./make_ret_test.sh ret_generics_types_6 unverifiable 'class Template`1<int8>' 'class Template`1<int64>'
879 ./make_ret_test.sh ret_generics_types_7 unverifiable 'class Template`1<int8>' 'class Template`1<unsigned int64>'
880 ./make_ret_test.sh ret_generics_types_8 unverifiable 'class Template`1<int8>' 'class Template`1<float32>'
881 ./make_ret_test.sh ret_generics_types_9 unverifiable 'class Template`1<int8>' 'class Template`1<float64>'
882 ./make_ret_test.sh ret_generics_types_10 unverifiable 'class Template`1<int8>' 'class Template`1<bool>'
883
884 ./make_ret_test.sh ret_generics_types_11 unverifiable 'class Template`1<int8>' 'class Template`1<native int>'
885 ./make_ret_test.sh ret_generics_types_12 unverifiable 'class Template`1<int8>' 'class Template`1<native unsigned int>'
886 ./make_ret_test.sh ret_generics_types_13 unverifiable 'class Template`1<int8>' 'class Template`1<int32 *>'
887
888
889 #inheritance tests
890 ./make_ret_test.sh ret_generics_inheritante_1 valid 'class Base`1<int32>' 'class SubClass1`1<int32>'
891 ./make_ret_test.sh ret_generics_inheritante_2 valid 'class SubClass1`1<int32>' 'class SubClass1`1<int32>'
892 ./make_ret_test.sh ret_generics_inheritante_3 unverifiable 'class SubClass1`1<int32>' 'class Base`1<int32>'
893 ./make_ret_test.sh ret_generics_inheritante_4 unverifiable 'class Base`1<int32>' 'class SubClass1`1<float32>'
894 ./make_ret_test.sh ret_generics_inheritante_5 valid 'class Base`1<object>' 'class SubClass1`1<object>'
895
896 ./make_ret_test.sh ret_generics_inheritante_6 valid 'class BaseBase`2<int32, object>' 'class SubClass1`1<object>'
897 ./make_ret_test.sh ret_generics_inheritante_7 valid 'class BaseBase`2<int32, object>' 'class Base`1<object>'
898
899 ./make_ret_test.sh ret_generics_inheritante_8 unverifiable 'class BaseBase`2<int64, object>' 'class Base`1<object>'
900 ./make_ret_test.sh ret_generics_inheritante_9 unverifiable 'class BaseBase`2<int64, object>' 'class SubClass1`1<object>'
901 ./make_ret_test.sh ret_generics_inheritante_10 unverifiable 'class BaseBase`2<int32, object>' 'class SubClass1`1<string>'
902
903 #interface tests
904
905 ./make_ret_test.sh ret_generics_inheritante_12 valid 'class Interface`1<int32>' 'class InterfaceImpl`1<int32>'
906 ./make_ret_test.sh ret_generics_inheritante_13 valid 'class InterfaceImpl`1<int32>' 'class InterfaceImpl`1<int32>'
907 ./make_ret_test.sh ret_generics_inheritante_14 unverifiable 'class InterfaceImpl`1<int32>' 'class Interface`1<int32>'
908 ./make_ret_test.sh ret_generics_inheritante_15 unverifiable 'class Interface`1<int32>' 'class InterfaceImpl`1<float32>'
909 ./make_ret_test.sh ret_generics_inheritante_16 valid 'class Interface`1<object>' 'class InterfaceImpl`1<object>'
910
911
912 #mix variance with inheritance
913 #only interfaces or delegates can have covariance
914
915 #mix variance with interfaces
916
917 ./make_ret_test.sh ret_generics_inheritante_28 valid 'class ICovariant`1<object>' 'class CovariantImpl`1<string>'
918 ./make_ret_test.sh ret_generics_inheritante_29 valid 'class ICovariant`1<string>' 'class CovariantImpl`1<string>'
919 ./make_ret_test.sh ret_generics_inheritante_30 unverifiable 'class ICovariant`1<string>' 'class CovariantImpl`1<object>'
920
921 ./make_ret_test.sh ret_generics_inheritante_31 valid 'class IContravariant`1<string>' 'class ContravariantImpl`1<object>'
922 ./make_ret_test.sh ret_generics_inheritante_32 valid 'class IContravariant`1<string>' 'class ContravariantImpl`1<string>'
923 ./make_ret_test.sh ret_generics_inheritante_33 unverifiable 'class IContravariant`1<object>' 'class ContravariantImpl`1<string>'
924
925 ./make_ret_test.sh ret_generics_inheritante_34 valid 'class ICovariant`1<ClassA>' 'class CovariantImpl`1<ClassSubA>'
926 ./make_ret_test.sh ret_generics_inheritante_35 valid 'class ICovariant`1<ClassSubA>' 'class CovariantImpl`1<ClassSubA>'
927 ./make_ret_test.sh ret_generics_inheritante_36 unverifiable 'class ICovariant`1<ClassSubA>' 'class CovariantImpl`1<ClassA>'
928
929 ./make_ret_test.sh ret_generics_inheritante_37 valid 'class IContravariant`1<ClassSubA>' 'class ContravariantImpl`1<ClassA>'
930 ./make_ret_test.sh ret_generics_inheritante_38 valid 'class IContravariant`1<ClassSubA>' 'class ContravariantImpl`1<ClassSubA>'
931 ./make_ret_test.sh ret_generics_inheritante_39 unverifiable 'class IContravariant`1<ClassA>' 'class ContravariantImpl`1<ClassSubA>'
932
933
934 #mix variance with arrays
935
936 ./make_ret_test.sh ret_generics_arrays_1 valid 'class ICovariant`1<object>' 'class ICovariant`1<object[]>'
937 ./make_ret_test.sh ret_generics_arrays_2 valid 'class ICovariant`1<object>' 'class ICovariant`1<int32[]>'
938 ./make_ret_test.sh ret_generics_arrays_3 valid 'class ICovariant`1<object>' 'class ICovariant`1<int32[,]>'
939 ./make_ret_test.sh ret_generics_arrays_4 valid 'class ICovariant`1<object>' 'class ICovariant`1<string[]>'
940 ./make_ret_test.sh ret_generics_arrays_5 valid 'class ICovariant`1<object[]>' 'class ICovariant`1<string[]>'
941 ./make_ret_test.sh ret_generics_arrays_6 valid 'class ICovariant`1<object[]>' 'class ICovariant`1<ClassA[]>'
942 ./make_ret_test.sh ret_generics_arrays_7 valid 'class ICovariant`1<ClassA[]>' 'class ICovariant`1<ClassSubA[]>'
943 ./make_ret_test.sh ret_generics_arrays_8 valid 'class ICovariant`1<InterfaceA[]>' 'class ICovariant`1<ImplA[]>'
944 ./make_ret_test.sh ret_generics_arrays_9 valid 'class ICovariant`1<object[,]>' 'class ICovariant`1<string[,]>'
945 ./make_ret_test.sh ret_generics_arrays_10 valid 'class ICovariant`1<ClassA[,]>' 'class ICovariant`1<ClassSubA[,]>'
946
947 ./make_ret_test.sh ret_generics_arrays_1_b valid 'class ICovariant`1<object>' 'class CovariantImpl`1<object[]>'
948 ./make_ret_test.sh ret_generics_arrays_2_b valid 'class ICovariant`1<object>' 'class CovariantImpl`1<int32[]>'
949 ./make_ret_test.sh ret_generics_arrays_3_b valid 'class ICovariant`1<object>' 'class CovariantImpl`1<int32[,]>'
950 ./make_ret_test.sh ret_generics_arrays_4_b valid 'class ICovariant`1<object>' 'class ICovariant`1<string[]>'
951 ./make_ret_test.sh ret_generics_arrays_5_b valid 'class ICovariant`1<object[]>' 'class CovariantImpl`1<string[]>'
952 ./make_ret_test.sh ret_generics_arrays_6_b valid 'class ICovariant`1<object[]>' 'class CovariantImpl`1<ClassA[]>'
953 ./make_ret_test.sh ret_generics_arrays_7_b valid 'class ICovariant`1<ClassA[]>' 'class CovariantImpl`1<ClassSubA[]>'
954 ./make_ret_test.sh ret_generics_arrays_8_b valid 'class ICovariant`1<InterfaceA[]>' 'class CovariantImpl`1<ImplA[]>'
955 ./make_ret_test.sh ret_generics_arrays_9_b valid 'class ICovariant`1<object[,]>' 'class CovariantImpl`1<string[,]>'
956 ./make_ret_test.sh ret_generics_arrays_10_b valid 'class ICovariant`1<ClassA[,]>' 'class CovariantImpl`1<ClassSubA[,]>'
957
958 ./make_ret_test.sh ret_generics_arrays_11 valid 'class IContravariant`1<object[]>' 'class IContravariant`1<object>'
959 ./make_ret_test.sh ret_generics_arrays_12 valid 'class IContravariant`1<int32[]>' 'class IContravariant`1<object>'
960 ./make_ret_test.sh ret_generics_arrays_13 valid 'class IContravariant`1<int32[,]>' 'class IContravariant`1<object>'
961 ./make_ret_test.sh ret_generics_arrays_14 valid 'class IContravariant`1<string[]>' 'class IContravariant`1<object>'
962 ./make_ret_test.sh ret_generics_arrays_15 valid 'class IContravariant`1<string[]>' 'class IContravariant`1<object[]>'
963 ./make_ret_test.sh ret_generics_arrays_16 valid 'class IContravariant`1<ClassA[]>' 'class IContravariant`1<object[]>'
964 ./make_ret_test.sh ret_generics_arrays_17 valid 'class IContravariant`1<ClassSubA[]>' 'class IContravariant`1<ClassA[]>'
965 ./make_ret_test.sh ret_generics_arrays_18 valid 'class IContravariant`1<ImplA[]>' 'class IContravariant`1<InterfaceA[]>'
966 ./make_ret_test.sh ret_generics_arrays_19 valid 'class IContravariant`1<string[,]>' 'class IContravariant`1<object[,]>'
967 ./make_ret_test.sh ret_generics_arrays_20 valid 'class IContravariant`1<ClassSubA[,]>' 'class IContravariant`1<ClassA[,]>'
968
969 ./make_ret_test.sh ret_generics_arrays_11_b valid 'class IContravariant`1<object[]>' 'class ContravariantImpl`1<object>'
970 ./make_ret_test.sh ret_generics_arrays_12_b valid 'class IContravariant`1<int32[]>' 'class ContravariantImpl`1<object>'
971 ./make_ret_test.sh ret_generics_arrays_13_b valid 'class IContravariant`1<int32[,]>' 'class ContravariantImpl`1<object>'
972 ./make_ret_test.sh ret_generics_arrays_14_b valid 'class IContravariant`1<string[]>' 'class ContravariantImpl`1<object>'
973 ./make_ret_test.sh ret_generics_arrays_15_b valid 'class IContravariant`1<string[]>' 'class ContravariantImpl`1<object[]>'
974 ./make_ret_test.sh ret_generics_arrays_16_b valid 'class IContravariant`1<ClassA[]>' 'class ContravariantImpl`1<object[]>'
975 ./make_ret_test.sh ret_generics_arrays_17_b valid 'class IContravariant`1<ClassSubA[]>' 'class ContravariantImpl`1<ClassA[]>'
976 ./make_ret_test.sh ret_generics_arrays_18_b valid 'class IContravariant`1<ImplA[]>' 'class ContravariantImpl`1<InterfaceA[]>'
977 ./make_ret_test.sh ret_generics_arrays_19_b valid 'class IContravariant`1<string[,]>' 'class ContravariantImpl`1<object[,]>'
978 ./make_ret_test.sh ret_generics_arrays_20_b valid 'class IContravariant`1<ClassSubA[,]>' 'class ContravariantImpl`1<ClassA[,]>'
979
980 ./make_ret_test.sh ret_generics_arrays_21 unverifiable 'class ICovariant`1<int32[]>' 'class ICovariant`1<object>'
981 ./make_ret_test.sh ret_generics_arrays_22 unverifiable 'class ICovariant`1<int32[]>' 'class ICovariant`1<object[]>'
982 ./make_ret_test.sh ret_generics_arrays_23 unverifiable 'class ICovariant`1<string[]>' 'class ICovariant`1<object[]>'
983 ./make_ret_test.sh ret_generics_arrays_24 unverifiable 'class ICovariant`1<ClassSubA[]>' 'class ICovariant`1<ClassA[]>'
984 ./make_ret_test.sh ret_generics_arrays_25 unverifiable 'class ICovariant`1<int32[]>' 'class ICovariant`1<int32[,]>'
985 ./make_ret_test.sh ret_generics_arrays_26 unverifiable 'class ICovariant`1<ImplA[]>' 'class ICovariant`1<InterfaceA[]>'
986
987 ./make_ret_test.sh ret_generics_arrays_27 unverifiable 'class IContravariant`1<object>' 'class IContravariant`1<int32[]>'
988 ./make_ret_test.sh ret_generics_arrays_28 unverifiable 'class IContravariant`1<object[]>' 'class IContravariant`1<int32[]>'
989 ./make_ret_test.sh ret_generics_arrays_29 unverifiable 'class IContravariant`1<object[]>' 'class IContravariant`1<string[]>'
990 ./make_ret_test.sh ret_generics_arrays_30 unverifiable 'class IContravariant`1<ClassA[]>' 'class IContravariant`1<ClassSubA[]>'
991 ./make_ret_test.sh ret_generics_arrays_31 unverifiable 'class IContravariant`1<int32[,]>' 'class IContravariant`1<int32[]>'
992 ./make_ret_test.sh ret_generics_arrays_32 unverifiable 'class IContravariant`1<InterfaceA[]>' 'class IContravariant`1<ImplA[]>'
993
994
995 #generic with value types
996
997 ./make_ret_test.sh ret_generics_vt_1 valid 'class Template`1<MyValueType>' 'class Template`1<MyValueType>'
998 ./make_ret_test.sh ret_generics_vt_2 unverifiable 'class Template`1<MyValueType>' 'class Template`1<MyValueType2>'
999 ./make_ret_test.sh ret_generics_vt_3 unverifiable 'class ICovariant`1<MyValueType>' 'class ICovariant`1<MyValueType2>'
1000 ./make_ret_test.sh ret_generics_vt_4 unverifiable 'class ICovariant`1<object>' 'class ICovariant`1<MyValueType2>'
1001
1002
1003 #mix variance and generic compatibility with all kinds of types valid for a generic parameter (hellish task - huge task)
1004 #test with composite generics ( Foo<Bar<int>> )
1005
1006 #test variance with delegates
1007 #generic methods
1008 #generic atributes
1009 #generic delegates
1010 #generic code
1011 #the verifier must check if the generic instantiation is valid
1012
1013 for OP in ldarg ldloc
1014 do
1015         ARGS_1='int32 V'
1016         LOCALS_1=''
1017         
1018         ARGS_2='int32 V, int32 V1'
1019         LOCALS_2=''
1020         
1021         ARGS_3='int32 V, int32 V1, int32 V1'
1022         LOCALS_3=''
1023         
1024         ARGS_4='int32 V, int32 V1, int32 V1, int32 V1'
1025         LOCALS_4=''
1026         
1027         POPS="pop\npop\npop\npop\npop\npop\npop\npop\n"
1028         
1029         if [ "$OP" == "ldloc" ]; then
1030                 LOCALS_1=$ARGS_1
1031                 ARGS_1=''
1032
1033                 LOCALS_2=$ARGS_2
1034                 ARGS_2=''
1035
1036                 LOCALS_3=$ARGS_3
1037                 ARGS_3=''
1038
1039                 LOCALS_4=$ARGS_4
1040                 ARGS_4=''
1041         fi;
1042         
1043         ./make_load_test.sh ${OP}0_max_params invalid "${OP}.0" '' ''
1044         ./make_load_test.sh ${OP}1_max_params invalid "${OP}.1" '' ''
1045         ./make_load_test.sh ${OP}2_max_params invalid "${OP}.2" '' ''
1046         ./make_load_test.sh ${OP}3_max_params invalid "${OP}.3" '' ''
1047         
1048         ./make_load_test.sh ${OP}1_1_max_params invalid "${OP}.1" "${ARGS_1}" "${LOCALS_1}"
1049         ./make_load_test.sh ${OP}2_1_max_params invalid "${OP}.2" "${ARGS_1}" "${LOCALS_1}"
1050         ./make_load_test.sh ${OP}3_1_max_params invalid "${OP}.3" "${ARGS_1}" "${LOCALS_1}"
1051         
1052         ./make_load_test.sh ${OP}2_2_max_params invalid "${OP}.2" "${ARGS_2}" "${LOCALS_2}"
1053         ./make_load_test.sh ${OP}3_2_max_params invalid "${OP}.3" "${ARGS_2}" "${LOCALS_2}"
1054         
1055         ./make_load_test.sh ${OP}3_3_max_params invalid "${OP}.3" "${ARGS_3}" "${LOCALS_3}"
1056         
1057         ./make_load_test.sh ${OP}0_max_params valid "${OP}.0" "${ARGS_1}" "${LOCALS_1}"
1058         ./make_load_test.sh ${OP}1_max_params valid "${OP}.1" "${ARGS_2}" "${LOCALS_2}"
1059         ./make_load_test.sh ${OP}2_max_params valid "${OP}.2" "${ARGS_3}" "${LOCALS_3}"
1060         ./make_load_test.sh ${OP}3_max_params valid "${OP}.3" "${ARGS_4}" "${LOCALS_4}"
1061         
1062         ./make_load_test.sh ${OP}0_stack_overflow invalid "${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${OP}.0\n${POPS}" "${ARGS_4}" "${LOCALS_4}"
1063         ./make_load_test.sh ${OP}1_stack_overflow invalid "${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${OP}.1\n${POPS}" "${ARGS_4}" "${LOCALS_4}"
1064         ./make_load_test.sh ${OP}2_stack_overflow invalid "${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${OP}.2\n${POPS}" "${ARGS_4}" "${LOCALS_4}"
1065         ./make_load_test.sh ${OP}3_stack_overflow invalid "${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${OP}.3\n${POPS}" "${ARGS_4}" "${LOCALS_4}"
1066 done
1067
1068 #Test if the values used for brtrue and brfalse are valid
1069 I=1
1070 for OP in brfalse brtrue 'brfalse.s' 'brtrue.s'
1071 do
1072         ./make_bool_branch_test.sh boolean_branch_${I}_1 valid ${OP} int8
1073         ./make_bool_branch_test.sh boolean_branch_${I}_2 valid ${OP} int16
1074         ./make_bool_branch_test.sh boolean_branch_${I}_3 valid ${OP} int32
1075         ./make_bool_branch_test.sh boolean_branch_${I}_4 valid ${OP} int64
1076         ./make_bool_branch_test.sh boolean_branch_${I}_5 valid ${OP} 'native int'
1077         
1078         #unmanaged pointers are not veriable types, all ops on unmanaged pointers are unverifiable
1079         ./make_bool_branch_test.sh boolean_branch_${I}_6 unverifiable ${OP} 'int32*'
1080         ./make_bool_branch_test.sh boolean_branch_${I}_8 unverifiable ${OP} 'method int32 *(int32)'
1081
1082         ./make_bool_branch_test.sh boolean_branch_${I}_7 valid ${OP} 'int32&'
1083         ./make_bool_branch_test.sh boolean_branch_${I}_9 valid ${OP} object
1084         ./make_bool_branch_test.sh boolean_branch_${I}_10 valid ${OP} string
1085         ./make_bool_branch_test.sh boolean_branch_${I}_11 valid ${OP} 'ClassA'
1086         ./make_bool_branch_test.sh boolean_branch_${I}_12 valid ${OP} 'int32[]'
1087         ./make_bool_branch_test.sh boolean_branch_${I}_13 valid ${OP} 'int32[,,]'
1088         ./make_bool_branch_test.sh boolean_branch_${I}_14 valid ${OP} 'class Template`1<object>'
1089         ./make_bool_branch_test.sh boolean_branch_${I}_15 valid ${OP} 'class Template`1<object>[]'
1090         ./make_bool_branch_test.sh boolean_branch_${I}_16 valid ${OP} 'class Template`1<object>[,,]'
1091         
1092         ./make_bool_branch_test.sh boolean_branch_${I}_17 invalid ${OP} float32
1093         ./make_bool_branch_test.sh boolean_branch_${I}_18 invalid ${OP} float64
1094         ./make_bool_branch_test.sh boolean_branch_${I}_19 invalid ${OP} 'class MyValueType'
1095         ./make_bool_branch_test.sh boolean_branch_${I}_20 invalid ${OP} 'class ValueTypeTemplate`1<object>'
1096         I=`expr $I + 1`
1097 done
1098