Hello Everyone, PR reports that sec_implicit2 and sec_implicit regression tests were failing in darwin. I looked into it and it is due to an uninitialized variable (rhs_length). This patch pasted below should fix that issue. Is this OK for trunk?
Here are the ChangeLog entries: 2013-05-31 Balaji V. Iyer <balaji.v.i...@intel.com> PR c/57474 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length array to NULL_TREE if they are unused. Also added a check for the field to be NULL before its fields are used in future. Here is the patch: diff --git gcc/c/c-array-notation.c gcc/c/c-array-notation.c index 5376e6b..7fbd573 100644 --- gcc/c/c-array-notation.c +++ gcc/c/c-array-notation.c @@ -1547,7 +1547,10 @@ build_array_notation_expr (location_t location, tree lhs, tr } else for (jj = 0; jj < rhs_rank; jj++) - rhs_vector[ii][jj] = false; + { + rhs_vector[ii][jj] = false; + rhs_length[ii][jj] = NULL_TREE; + } } if (length_mismatch_in_expr_p (EXPR_LOCATION (lhs), lhs_length, @@ -1561,6 +1564,7 @@ build_array_notation_expr (location_t location, tree lhs, tre if (lhs_list_size > 0 && rhs_list_size > 0 && lhs_rank > 0 && rhs_rank > 0 && TREE_CODE (lhs_length[0][0]) == INTEGER_CST + && rhs_length[0][0] && TREE_CODE (rhs_length[0][0]) == INTEGER_CST) { HOST_WIDE_INT l_length = int_cst_value (lhs_length[0][0]); Thanks, Balaji V. Iyer.