aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
blob: 1e5ca00a40b374fcae1e69179287d6bb5d1e8a33 (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
29
30
31
32
33
34
35
/* PR c/60197 */
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */

extern int foo (void);

int
fn1 (void)
{
  int i;
  i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
  return i;
}

int
fn2 (void)
{
  int i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
  return i;
}

int
fn3 (int j, int k, int l)
{
  int i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
  return i;
}

int
fn4 (int j, int k, int l)
{
  int i;
  i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
  return i;
}