aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-array-notation.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c/c-array-notation.c')
-rw-r--r--gcc/c/c-array-notation.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c/c-array-notation.c b/gcc/c/c-array-notation.c
index a0fe2fb..b4015b8 100644
--- a/gcc/c/c-array-notation.c
+++ b/gcc/c/c-array-notation.c
@@ -310,7 +310,9 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
|| an_type == BUILT_IN_CILKPLUS_SEC_REDUCE_MIN_IND)
array_ind_value = build_decl (location, VAR_DECL, NULL_TREE,
TREE_TYPE (func_parm));
- array_op0 = (*array_operand)[0];
+ 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: