aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch.c
blob: eb3c1f1d68567cb90463ee75d8a78eae4b24d852 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* { dg-do compile } */
/* { dg-options "-fcilkplus -w" } */

/* We use -w because in the first error, there will be a warning of setting an
   integer to a pointer.  Just ignore it to expose the rank mismatch error.  */

int main (void)
{
  int x = 0;
  int array[10][10], array2[10];

  array[:][:] = array[:]; /* { dg-error "rank mismatch between" } */
  /* { dg-error "invalid conversion" "" { target c++ } 12 } */

  x = array2[:]; /* { dg-error "cannot be scalar when" } */

  return 0;
}