]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / gcc / testsuite / c-c++-common / cilk-plus / AN / decl-ptr-colon.c
1 /* { dg-do compile { target c } } */
2 /* { dg-options "-fcilkplus" } */
3
4 int main(void)
5 {
6 extern int func(int);
7 int array3[:], x, q; /* { dg-error "array notations cannot be used in declaration" } */
8 int array3[1:2:x]; /* { dg-error "array notations cannot be used in declaration" } */
9 extern char array3[1:func(x)]; /* { dg-error "array notations cannot be used in declaration" } */
10 int *a, ***b;
11 extern char *c;
12 int array2[10];
13
14 a[:] = 5; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
15 c[1:2] = 3; /* This is OK. */
16 (array2)[:] = 5; /* This is OK. */
17 b[1:2][1:func(x)][:] = 3; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
18 }
19