Commit 9dc7743c by Igor Zamyatin Committed by Kirill Yukhin

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
parent 8a57e88d
2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/58942
* c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
with a pointer.
2014-06-03 Marek Polacek <polacek@redhat.com>
PR c/60439
......
......@@ -311,6 +311,8 @@ fix_builtin_array_notation_fn (tree an_builtin_fn, tree *new_var)
array_ind_value = build_decl (location, VAR_DECL, NULL_TREE,
TREE_TYPE (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:
......
2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/58942
* cp-array-notation.c (expand_sec_reduce_builtin): Handle the case
with a pointer.
2014-06-03 Paolo Carlini <paolo.carlini@oracle.com>
DR 1423
......
......@@ -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:
......
2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
PR c/58942
* c-c++-common/cilk-plus/AN/pr58942.c: Check for correct handling of
the case with a pointer.
2014-06-04 Marek Polacek <polacek@redhat.com>
PR c/30020
......
/* PR c/58942 */
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
int foo (int*p, int i)
{
return __sec_reduce_max_ind(p[1:i]);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment