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