aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-array-notation.c
diff options
context:
space:
mode:
authorBalaji V. Iyer <balaji.v.iyer@intel.com>2013-06-03 21:07:54 +0000
committerBalaji V. Iyer <bviyer@gcc.gnu.org>2013-06-03 14:07:54 -0700
commitedd2564566a0b6e9ca7252b3ac66f346deb31a2f (patch)
treea3a0759808c3b503e9474aff85f0b8ea1914f7d4 /gcc/c/c-array-notation.c
parent2e6491515ec153d17427a635cdfbfbc5bda0a7f1 (diff)
downloadgcc-edd2564566a0b6e9ca7252b3ac66f346deb31a2f.zip
gcc-edd2564566a0b6e9ca7252b3ac66f346deb31a2f.tar.gz
gcc-edd2564566a0b6e9ca7252b3ac66f346deb31a2f.tar.bz2
re PR c/57474 (FAIL: c-c++-common/cilk-plus/AN/sec_implicit2?.c -fcilkplus (internal compiler error) on x86_64-apple-darwin10)
2013-06-03 Balaji V. Iyer <balaji.v.iyer@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. From-SVN: r199627
Diffstat (limited to 'gcc/c/c-array-notation.c')
-rw-r--r--gcc/c/c-array-notation.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index bf139a8..0807466 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -1541,7 +1541,10 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
}
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,
@@ -1555,6 +1558,7 @@ build_array_notation_expr (location_t location, tree lhs, tree lhs_origtype,
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]);