annotate gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-do compile } */
kono
parents:
diff changeset
2 /* { dg-options "-fcilkplus" } */
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 float q;
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 void func (int *x)
kono
parents:
diff changeset
7 {
kono
parents:
diff changeset
8 *x = 5;
kono
parents:
diff changeset
9 }
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 int main (void)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 int array[10], array2[10];
kono
parents:
diff changeset
14 array2[:] = array[1.5:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
kono
parents:
diff changeset
15 array2[:] = array[1:2.32333333333]; /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
16 array2[1:2:1.5] = array[:]; /* { dg-error "stride of array notation triplet is not an integer" } */
kono
parents:
diff changeset
17 func (&array2[1:2.34:3]); /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
18 array2[1.43:9]++; /* { dg-error "start-index of array notation triplet is not an integer" } */
kono
parents:
diff changeset
19 array2[1:9.3]++; /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
20 array2[1:9:0.3]++; /* { dg-error "stride of array notation triplet is not an integer" } */
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 ++array2[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
23 array2[:] = array[q:1:3]; /* { dg-error "start-index of array notation triplet is not an integer" } */
kono
parents:
diff changeset
24 array2[:] = array[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
25 array2[:] = array[1:3:q]; /* { dg-error "stride of array notation triplet is not an integer" } */
kono
parents:
diff changeset
26 func (&array2[1:q:3]); /* { dg-error "length of array notation triplet is not an integer" } */
kono
parents:
diff changeset
27 return 0;
kono
parents:
diff changeset
28 }