equal
deleted
inserted
replaced
104 l = (list_c *)symbol->subscript_list; |
104 l = (list_c *)symbol->subscript_list; |
105 var_decl = search_varfb_instance_type->get_basetype_decl(symbol->subscripted_variable); |
105 var_decl = search_varfb_instance_type->get_basetype_decl(symbol->subscripted_variable); |
106 array_dimension_iterator_c array_dimension_iterator(var_decl); |
106 array_dimension_iterator_c array_dimension_iterator(var_decl); |
107 for (int i = 0; i < l->n; i++) { |
107 for (int i = 0; i < l->n; i++) { |
108 subrange_c *dimension = array_dimension_iterator.next(); |
108 subrange_c *dimension = array_dimension_iterator.next(); |
|
109 /* mismatch between number of indexes/subscripts. This error will be caught in check_dimension_count() so we ignore it. */ |
|
110 if (NULL == dimension) |
|
111 return; |
109 |
112 |
110 if ( VALID_CVALUE( int64, l->elements[i]) && VALID_CVALUE( int64, dimension->lower_limit)) |
113 if ( VALID_CVALUE( int64, l->elements[i]) && VALID_CVALUE( int64, dimension->lower_limit)) |
111 if ( GET_CVALUE( int64, l->elements[i]) < GET_CVALUE( int64, dimension->lower_limit)) |
114 if ( GET_CVALUE( int64, l->elements[i]) < GET_CVALUE( int64, dimension->lower_limit)) |
112 {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;} |
115 {STAGE3_ERROR(0, symbol, symbol, "Array access out of bounds."); continue;} |
113 |
116 |