aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cilk-plus/array_notation_tests/errors/sec_reduce_max_min_ind.cc
blob: d4a5b773719556dae8a6d62af27dee87c8888525 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options } */

int main (int argc, char **argv)
{
  int array[10][10], array2[10];
  int x, y;
  x = __sec_reduce_max_ind (array[:][:]); /* { dg-error "cannot have arrays with dimension greater than" } */

  y = __sec_reduce_max_ind (array2[:]); /* this should be OK. */

  x = __sec_reduce_min_ind (array[0:10][:]); /* { dg-error "cannot have arrays with dimension greater than" } */

  y = __sec_reduce_min_ind (array2[:]); /* this should be OK. */
  y = __sec_reduce_min_ind (array[10][:]); /* this should be OK also. */

  return 0;
}