aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-array-notation.c
diff options
context:
space:
mode:
authorIgor Zamyatin <igor.zamyatin@intel.com>2014-06-04 10:07:21 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-06-04 10:07:21 +0000
commit9dc7743c7864cbdc0f62a827c9af6a854ebfa98f (patch)
treeb827052a451a21de8375b6509b0a00c4b09917da /gcc/cp/cp-array-notation.c
parent8a57e88dc63d44a2f72781e4732ede00f14205cf (diff)
downloadgcc-9dc7743c7864cbdc0f62a827c9af6a854ebfa98f.zip
gcc-9dc7743c7864cbdc0f62a827c9af6a854ebfa98f.tar.gz
gcc-9dc7743c7864cbdc0f62a827c9af6a854ebfa98f.tar.bz2
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
Diffstat (limited to 'gcc/cp/cp-array-notation.c')
-rw-r--r--gcc/cp/cp-array-notation.c2
1 files changed, 2 insertions, 0 deletions
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: