]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/cilk-plus/pr69798-1.c
[Patch AArch64] Fixup floating point division with -march=armv8-a+nosimd
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / cilk-plus / pr69798-1.c
1 /* PR c/69798 */
2 /* { dg-do compile } */
3 /* { dg-options "-fcilkplus" } */
4
5 extern int foo (void);
6
7 void
8 fn1 (int i, int *p)
9 {
10 l:
11 _Cilk_spawn (void); /* { dg-error "expected expression" } */
12 _Cilk_spawn (char []); /* { dg-error "expected expression" } */
13 _Cilk_spawn (int *); /* { dg-error "expected expression" } */
14 _Cilk_spawn (int) 1; /* { dg-error "only function calls can be spawned" } */
15 _Cilk_spawn ({}); /* { dg-error "only function calls can be spawned" } */
16 _Cilk_spawn ++i; /* { dg-error "only function calls can be spawned" } */
17 _Cilk_spawn i++; /* { dg-error "only function calls can be spawned" } */
18 _Cilk_spawn --i; /* { dg-error "only function calls can be spawned" } */
19 _Cilk_spawn i--; /* { dg-error "only function calls can be spawned" } */
20 _Cilk_spawn &i; /* { dg-error "only function calls can be spawned" } */
21 _Cilk_spawn +i; /* { dg-error "only function calls can be spawned" } */
22 _Cilk_spawn -i; /* { dg-error "only function calls can be spawned" } */
23 _Cilk_spawn ~i; /* { dg-error "only function calls can be spawned" } */
24 _Cilk_spawn !i; /* { dg-error "only function calls can be spawned" } */
25 _Cilk_spawn *p; /* { dg-error "only function calls can be spawned" } */
26 _Cilk_spawn &&l; /* { dg-error "only function calls can be spawned" } */
27 _Cilk_spawn sizeof (i); /* { dg-error "only function calls can be spawned" } */
28 _Cilk_spawn sizeof (short); /* { dg-error "only function calls can be spawned" } */
29 _Cilk_spawn __alignof__ (i); /* { dg-error "only function calls can be spawned" } */
30 _Cilk_spawn __alignof__ (short); /* { dg-error "only function calls can be spawned" } */
31 _Cilk_spawn __extension__ i; /* { dg-error "only function calls can be spawned" } */
32 _Cilk_spawn __func__; /* { dg-error "only function calls can be spawned" } */
33 _Cilk_spawn p[0]; /* { dg-error "only function calls can be spawned" } */
34 _Cilk_spawn __real__ i; /* { dg-error "only function calls can be spawned" } */
35 _Cilk_spawn __imag__ i; /* { dg-error "only function calls can be spawned" } */
36 _Cilk_spawn !foo (); /* { dg-error "only function calls can be spawned" } */
37 _Cilk_spawn ~foo (); /* { dg-error "only function calls can be spawned" } */
38 _Cilk_spawn (unsigned) foo (); /* { dg-error "only function calls can be spawned" } */
39 }
40
41 void
42 fn2 (int i, int *p)
43 {
44 l:
45 _Cilk_spawn _Cilk_spawn (void); /* { dg-error "consecutive|expected expression" } */
46 _Cilk_spawn _Cilk_spawn (char []); /* { dg-error "consecutive|expected expression" } */
47 _Cilk_spawn _Cilk_spawn (int *); /* { dg-error "consecutive|expected expression" } */
48 _Cilk_spawn _Cilk_spawn (int) 1; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
49 _Cilk_spawn _Cilk_spawn ({}); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
50 _Cilk_spawn _Cilk_spawn ++i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
51 _Cilk_spawn _Cilk_spawn i++; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
52 _Cilk_spawn _Cilk_spawn --i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
53 _Cilk_spawn _Cilk_spawn i--; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
54 _Cilk_spawn _Cilk_spawn &i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
55 _Cilk_spawn _Cilk_spawn +i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
56 _Cilk_spawn _Cilk_spawn -i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
57 _Cilk_spawn _Cilk_spawn ~i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
58 _Cilk_spawn _Cilk_spawn !i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
59 _Cilk_spawn _Cilk_spawn *p; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
60 _Cilk_spawn _Cilk_spawn &&l; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
61 _Cilk_spawn _Cilk_spawn sizeof (i); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
62 _Cilk_spawn _Cilk_spawn sizeof (short); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
63 _Cilk_spawn _Cilk_spawn __alignof__ (i); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
64 _Cilk_spawn _Cilk_spawn __alignof__ (short); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
65 _Cilk_spawn _Cilk_spawn __extension__ i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
66 _Cilk_spawn _Cilk_spawn __func__; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
67 _Cilk_spawn _Cilk_spawn p[0]; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
68 _Cilk_spawn _Cilk_spawn __real__ i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
69 _Cilk_spawn _Cilk_spawn __imag__ i; /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
70 _Cilk_spawn _Cilk_spawn !foo (); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
71 _Cilk_spawn _Cilk_spawn ~foo (); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
72 _Cilk_spawn _Cilk_spawn (unsigned) foo (); /* { dg-error "consecutive ._Cilk_spawn. keywords are not permitted" } */
73 }