]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c
1 /* { dg-do compile { target c } } */
2 /* { dg-options "-fcilkplus" } */
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" } */
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" } */