From 9dc7743c7864cbdc0f62a827c9af6a854ebfa98f Mon Sep 17 00:00:00 2001 From: Igor Zamyatin Date: Wed, 4 Jun 2014 10:07:21 +0000 Subject: re PR c/58942 (cilkplus internal compiler error: tree check __sec_reduce_max_ind) gcc/c/ PR c/58942 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case with a pointer. gcc/cp/ PR c/58942 * cp-array-notation.c (expand_sec_reduce_builtin): Handle the case with a pointer. gcc/testsuite/ PR c/58942 * c-c++-common/cilk-plus/AN/pr58942.c: Check for correct handling of the case with a pointer. From-SVN: r211220 --- gcc/cp/cp-array-notation.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/cp/cp-array-notation.c') diff --git a/gcc/cp/cp-array-notation.c b/gcc/cp/cp-array-notation.c index ff82dee..0538e55 100644 --- a/gcc/cp/cp-array-notation.c +++ b/gcc/cp/cp-array-notation.c @@ -340,6 +340,8 @@ expand_sec_reduce_builtin (tree an_builtin_fn, tree *new_var) array_ind_value = get_temp_regvar (TREE_TYPE (func_parm), func_parm); array_op0 = (*array_operand)[0]; + if (TREE_CODE (array_op0) == INDIRECT_REF) + array_op0 = TREE_OPERAND (array_op0, 0); switch (an_type) { case BUILT_IN_CILKPLUS_SEC_REDUCE_ADD: -- cgit v1.1