Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/cilk-plus/AN/gather-scatter-errors.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-options "-fcilkplus" } */ | |
2 | |
3 int main (void) | |
4 { | |
5 extern int func (int); | |
6 int array[10][10], array2[10]; | |
7 int argc = 1; | |
8 array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */ | |
9 | |
10 array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */ | |
11 func (array2[array[:][:]]); /* { dg-error "rank of the array's index is greater than 1" } */ | |
12 func (array2[array[argc:func(5)][0:10:2]]); /* { dg-error "rank of the array's index is greater than 1" } */ | |
13 | |
14 array[array2[:]][array2[:]] = 5; /* This is OK. */ | |
15 array[array2[:]][array2[:]] = array2[array[:][:]]; /* { dg-error "rank of the array's index is greater than 1" } */ | |
16 array[array2[:]][array2[:]] = array2[array[0:10:1][:]]; /* { dg-error "rank of the array's index is greater than 1" } */ | |
17 array[array2[:]][array2[:]] = array2[array[:][argc:func (argc)]]; /* { dg-error "rank of the array's index is greater than 1" } */ | |
18 return 0; | |
19 } |