@@ -1259,6 +1259,10 @@ object (self)
12591259 memref_r memoff_r
12601260
12611261 method private get_variable_type (v : variable_t ): btype_t traceresult =
1262+ let is_zero (x : xpr_t ) =
1263+ match x with
1264+ | XConst (IntConst n ) -> n#equal numerical_zero
1265+ | _ -> false in
12621266 if self#f#env#is_initial_register_value v then
12631267 let reg_r = self#f#env#get_initial_register_value_register v in
12641268 TR. tbind
@@ -1348,6 +1352,43 @@ object (self)
13481352 let cinfo = get_compinfo_by_key ckey in
13491353 let finfo = get_compinfo_field cinfo fname in
13501354 Ok finfo.bftype
1355+ | IndexOffset (v , i , memsuboff ) ->
1356+ Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
1357+ ^ " index offset: "
1358+ ^ (memory_offset_to_string memoff)
1359+ ^ " with "
1360+ ^ (p2s v#toPretty)
1361+ ^ " , index: "
1362+ ^ (string_of_int i)
1363+ ^ " ; and "
1364+ ^ (memory_offset_to_string memsuboff)]
1365+ | ArrayIndexOffset (x , memsuboff ) ->
1366+ Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
1367+ ^ " array index offset: "
1368+ ^ (memory_offset_to_string memoff)
1369+ ^ " with "
1370+ ^ (x2s x)
1371+ ^ " ; and "
1372+ ^ (memory_offset_to_string memsuboff)]
1373+ | BasePtrArrayIndexOffset (x , _ ) when is_zero x ->
1374+ (match basevartype with
1375+ | TPtr (t , _ ) -> Ok t
1376+ | _ ->
1377+ Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
1378+ ^ " array index offset: "
1379+ ^ (memory_offset_to_string memoff)
1380+ ^ " with basevar type: "
1381+ ^ (btype_to_string basevartype)
1382+ ^ " not yet handled" ])
1383+ | BasePtrArrayIndexOffset (x , memsuboff ) ->
1384+ Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
1385+ ^ " base-ptr array index offset: "
1386+ ^ (memory_offset_to_string memoff)
1387+ ^ " with "
1388+ ^ (x2s x)
1389+ ^ " ; and "
1390+ ^ (memory_offset_to_string memsuboff)]
1391+
13511392 | _ ->
13521393 Error [__FILE__ ^ " :" ^ (string_of_int __LINE__) ^ " : "
13531394 ^ " memoff: " ^ (memory_offset_to_string memoff)
0 commit comments