Remove potential access to NULL pointer.
--- a/stage3/array_range_check.cc Tue Jun 12 17:07:40 2012 +0100
+++ b/stage3/array_range_check.cc Tue Jun 12 17:12:09 2012 +0100
@@ -106,6 +106,9 @@
array_dimension_iterator_c array_dimension_iterator(var_decl);
for (int i = 0; i < l->n; i++) {
subrange_c *dimension = array_dimension_iterator.next();
+ /* mismatch between number of indexes/subscripts. This error will be caught in check_dimension_count() so we ignore it. */
+ if (NULL == dimension)
+ return;
if ( VALID_CVALUE( int64, l->elements[i]) && VALID_CVALUE( int64, dimension->lower_limit))
if ( GET_CVALUE( int64, l->elements[i]) < GET_CVALUE( int64, dimension->lower_limit))