aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c
blob: b2ac7bcc85aa79cf8e0f3bad6bb62c58bce6bb75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */

float q;

void func (int *x)
{
  *x = 5;
}

int main (void)
{
  int array[10], array2[10];
  array2[:] = array[1.5:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
  array2[:] = array[1:2.32333333333]; /* { dg-error "length of array notation triplet is not an integer" } */
  array2[1:2:1.5] = array[:]; /* { dg-error "stride of array notation triplet is not an integer" } */
  func (&array2[1:2.34:3]); /* { dg-error "length of array notation triplet is not an integer" } */
  array2[1.43:9]++; /* { dg-error "start-index of array notation triplet is not an integer" } */
  array2[1:9.3]++; /* { dg-error "length of array notation triplet is not an integer" } */
  array2[1:9:0.3]++; /* { dg-error "stride of array notation triplet is not an integer" } */
  
  ++array2[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
  array2[:] = array[q:1:3]; /* { dg-error "start-index of array notation triplet is not an integer" } */
  array2[:] = array[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
  array2[:] = array[1:3:q]; /* { dg-error "stride of array notation triplet is not an integer" } */
  func (&array2[1:q:3]); /* { dg-error "length of array notation triplet is not an integer" } */
  return 0;
}