| 1 |
// RUN: %clang_cc1 %s -verify -fopenacc |
| 2 |
|
| 3 |
void func() { |
| 4 |
int i, j; |
| 5 |
|
| 6 |
#pragma acc parallel wait |
| 7 |
{} |
| 8 |
|
| 9 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 10 |
#pragma acc parallel wait clause-list |
| 11 |
{} |
| 12 |
|
| 13 |
// expected-error@+3{{expected expression}} |
| 14 |
// expected-error@+2{{expected ')'}} |
| 15 |
// expected-note@+1{{to match this '('}} |
| 16 |
#pragma acc parallel wait ( |
| 17 |
{} |
| 18 |
|
| 19 |
// expected-error@+1{{expected expression}} |
| 20 |
#pragma acc parallel wait () |
| 21 |
{} |
| 22 |
|
| 23 |
// expected-error@+2{{expected expression}} |
| 24 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 25 |
#pragma acc parallel wait () clause-list |
| 26 |
{} |
| 27 |
|
| 28 |
// expected-error@+3{{expected expression}} |
| 29 |
// expected-error@+2{{expected ')'}} |
| 30 |
// expected-note@+1{{to match this '('}} |
| 31 |
#pragma acc parallel wait (devnum: |
| 32 |
{} |
| 33 |
|
| 34 |
// expected-error@+1{{expected expression}} |
| 35 |
#pragma acc parallel wait (devnum:) |
| 36 |
{} |
| 37 |
|
| 38 |
// expected-error@+2{{expected expression}} |
| 39 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 40 |
#pragma acc parallel wait (devnum:) clause-list |
| 41 |
{} |
| 42 |
|
| 43 |
// expected-error@+3{{expected ':'}} |
| 44 |
// expected-error@+2{{expected ')'}} |
| 45 |
// expected-note@+1{{to match this '('}} |
| 46 |
#pragma acc parallel wait (devnum: i + j |
| 47 |
{} |
| 48 |
|
| 49 |
// expected-error@+1{{expected ':'}} |
| 50 |
#pragma acc parallel wait (devnum: i + j) |
| 51 |
{} |
| 52 |
|
| 53 |
// expected-error@+2{{expected ':'}} |
| 54 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 55 |
#pragma acc parallel wait (devnum: i + j) clause-list |
| 56 |
{} |
| 57 |
|
| 58 |
// expected-error@+3{{expected expression}} |
| 59 |
// expected-error@+2{{expected ')'}} |
| 60 |
// expected-note@+1{{to match this '('}} |
| 61 |
#pragma acc parallel wait (queues: |
| 62 |
{} |
| 63 |
|
| 64 |
// expected-error@+1{{expected expression}} |
| 65 |
#pragma acc parallel wait (queues:) |
| 66 |
{} |
| 67 |
|
| 68 |
// expected-error@+2{{expected expression}} |
| 69 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 70 |
#pragma acc parallel wait (queues:) clause-list |
| 71 |
{} |
| 72 |
|
| 73 |
// expected-error@+3{{expected expression}} |
| 74 |
// expected-error@+2{{expected ')'}} |
| 75 |
// expected-note@+1{{to match this '('}} |
| 76 |
#pragma acc parallel wait (devnum: i + j:queues: |
| 77 |
{} |
| 78 |
|
| 79 |
// expected-error@+1{{expected expression}} |
| 80 |
#pragma acc parallel wait (devnum: i + j:queues:) |
| 81 |
{} |
| 82 |
|
| 83 |
// expected-error@+2{{expected expression}} |
| 84 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 85 |
#pragma acc parallel wait (devnum: i + j:queues:) clause-list |
| 86 |
{} |
| 87 |
|
| 88 |
// expected-error@+3{{use of undeclared identifier 'devnum'}} |
| 89 |
// expected-error@+2{{expected ')'}} |
| 90 |
// expected-note@+1{{to match this '('}} |
| 91 |
#pragma acc parallel wait (queues:devnum: i + j |
| 92 |
{} |
| 93 |
|
| 94 |
// expected-error@+1{{use of undeclared identifier 'devnum'}} |
| 95 |
#pragma acc parallel wait (queues:devnum: i + j) |
| 96 |
{} |
| 97 |
|
| 98 |
// expected-error@+2{{use of undeclared identifier 'devnum'}} |
| 99 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 100 |
#pragma acc parallel wait (queues:devnum: i + j) clause-list |
| 101 |
{} |
| 102 |
|
| 103 |
// expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 104 |
// expected-error@+2{{expected ')'}} |
| 105 |
// expected-note@+1{{to match this '('}} |
| 106 |
#pragma acc parallel wait(i, j, 1+1, 3.3 |
| 107 |
{} |
| 108 |
|
| 109 |
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 110 |
#pragma acc parallel wait(i, j, 1+1, 3.3) |
| 111 |
{} |
| 112 |
// expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 113 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 114 |
#pragma acc parallel wait(i, j, 1+1, 3.3) clause-list |
| 115 |
{} |
| 116 |
|
| 117 |
// expected-error@+3{{expected expression}} |
| 118 |
// expected-error@+2{{expected ')'}} |
| 119 |
// expected-note@+1{{to match this '('}} |
| 120 |
#pragma acc parallel wait(, |
| 121 |
{} |
| 122 |
|
| 123 |
// expected-error@+1{{expected expression}} |
| 124 |
#pragma acc parallel wait(,) |
| 125 |
{} |
| 126 |
|
| 127 |
// expected-error@+2{{expected expression}} |
| 128 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 129 |
#pragma acc parallel wait(,) clause-list |
| 130 |
{} |
| 131 |
|
| 132 |
// expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 133 |
// expected-error@+2{{expected ')'}} |
| 134 |
// expected-note@+1{{to match this '('}} |
| 135 |
#pragma acc parallel wait(queues:i, j, 1+1, 3.3 |
| 136 |
{} |
| 137 |
|
| 138 |
// expected-error@+4{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 139 |
// expected-error@+3{{expected expression}} |
| 140 |
// expected-error@+2{{expected ')'}} |
| 141 |
// expected-note@+1{{to match this '('}} |
| 142 |
#pragma acc parallel wait(queues:i, j, 1+1, 3.3, |
| 143 |
{} |
| 144 |
|
| 145 |
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 146 |
#pragma acc parallel wait(queues:i, j, 1+1, 3.3) |
| 147 |
{} |
| 148 |
|
| 149 |
// expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 150 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 151 |
#pragma acc parallel wait(queues:i, j, 1+1, 3.3) clause-list |
| 152 |
{} |
| 153 |
|
| 154 |
// expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 155 |
// expected-error@+2{{expected ')'}} |
| 156 |
// expected-note@+1{{to match this '('}} |
| 157 |
#pragma acc parallel wait(devnum:3:i, j, 1+1, 3.3 |
| 158 |
{} |
| 159 |
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 160 |
#pragma acc parallel wait(devnum:3:i, j, 1+1, 3.3) |
| 161 |
{} |
| 162 |
// expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 163 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 164 |
#pragma acc parallel wait(devnum:3:i, j, 1+1, 3.3) clause-list |
| 165 |
{} |
| 166 |
|
| 167 |
// expected-error@+3{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 168 |
// expected-error@+2{{expected ')'}} |
| 169 |
// expected-note@+1{{to match this '('}} |
| 170 |
#pragma acc parallel wait(devnum:3:queues:i, j, 1+1, 3.3 |
| 171 |
{} |
| 172 |
// expected-error@+1{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 173 |
#pragma acc parallel wait(devnum:3:queues:i, j, 1+1, 3.3) |
| 174 |
{} |
| 175 |
// expected-error@+2{{OpenACC clause 'wait' requires expression of integer type ('double' invalid)}} |
| 176 |
// expected-error@+1{{invalid OpenACC clause 'clause'}} |
| 177 |
#pragma acc parallel wait(devnum:3:queues:i, j, 1+1, 3.3) clause-list |
| 178 |
{} |
| 179 |
} |