Commit d8000f03 by Jonathan Wakely Committed by Jonathan Wakely

re PR c/61271 (10 * possible coding error with logical not (!))

cp:
	PR c/61271
	* cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.

testsuite:
	PR c/61271
	* g++.dg/cilk-plus/AN/array_function.cc: New.

From-SVN: r210804
parent 6aa9ea7f
2014-05-21 Jonathan Wakely <jwakely@redhat.com>
PR c/61271
* cp-array-notation.c (cilkplus_an_triplet_types_ok_p): Fix condition.
2014-05-21 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/61133
......
......@@ -26,7 +26,7 @@
An array notation expression has 4 major components:
1. The array name
2. Start Index
3. Number of elements we need to acess (we call it length)
3. Number of elements we need to access (we call it length)
4. Stride
So, if we have something like A[0:5:2], we are accessing A[0], A[2], A[4],
......@@ -1418,7 +1418,7 @@ cilkplus_an_triplet_types_ok_p (location_t loc, tree start_index, tree length,
error_at (loc, "stride of array notation triplet is not an integer");
return false;
}
if (!TREE_CODE (type) == FUNCTION_TYPE)
if (TREE_CODE (type) == FUNCTION_TYPE)
{
error_at (loc, "array notation cannot be used with function type");
return false;
......
2014-05-21 Jonathan Wakely <jwakely@redhat.com>
PR c/61271
* g++.dg/cilk-plus/AN/array_function.cc: New.
2014-05-22 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/alias-33.c: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
void f() { }
int main()
{
f[0:1:1]; // { dg-error "function type" }
}
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