Commit cd4e76fc by Igor Zamyatin Committed by Kirill Yukhin

re PR other/61962 (GCC seems to enter an infinite loop when compiling the above cilk+ code.)

PR other/61962

gcc/c-family/
        * array-notation-common.c (find_rank): Added handling for other
        types of references.

testsuite/
        * c-c++-common/cilk-plus/AN/pr61962.c: New test.

From-SVN: r213858
parent 7955b065
2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
PR other/61962
* array-notation-common.c (find_rank): Added handling for other
types of references.
2014-08-10 Marek Polacek <polacek@redhat.com>
PR c/51849
......
......@@ -221,11 +221,14 @@ find_rank (location_t loc, tree orig_expr, tree expr, bool ignore_builtin_fn,
current_rank++;
ii_tree = ARRAY_NOTATION_ARRAY (ii_tree);
}
else if (TREE_CODE (ii_tree) == ARRAY_REF)
else if (handled_component_p (ii_tree)
|| TREE_CODE (ii_tree) == INDIRECT_REF)
ii_tree = TREE_OPERAND (ii_tree, 0);
else if (TREE_CODE (ii_tree) == PARM_DECL
|| TREE_CODE (ii_tree) == VAR_DECL)
break;
else
gcc_unreachable ();
}
if (*rank == 0)
/* In this case, all the expressions this function has encountered thus
......
2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
PR other/61962
* c-c++-common/cilk-plus/AN/pr61962.c: New test.
2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
PR middle-end/62103
......
/* PR other/61962 */
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
struct FloatStruct
{
float *f;
};
/* Either SRC or DST must be a struct, otherwise the bug does not occur. */
void f (struct FloatStruct* dst, float *src, unsigned int length)
{
dst->f[0:length] = src[0:length];
}
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