You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clang/test/SemaOpenACC/combined-construct-reduction-clause.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -166,7 +166,7 @@ void uses(unsigned Parm) {
166
166
167
167
CompositeHasComposite CoCArr[5];
168
168
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
169
-
// expected-note@+3{{used as element type of array type 'CompositeHasComposite'}}
169
+
// expected-note@+3{{used as element type of array type 'CompositeHasComposite[5]'}}
170
170
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
171
171
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
Copy file name to clipboardExpand all lines: clang/test/SemaOpenACC/compute-construct-reduction-clause.cpp
+48-4Lines changed: 48 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -91,7 +91,7 @@ void uses(unsigned Parm) {
91
91
92
92
CompositeHasComposite CoCArr[5];
93
93
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
94
-
// expected-note@+3{{used as element type of array type 'CompositeHasComposite'}}
94
+
// expected-note@+3{{used as element type of array type 'CompositeHasComposite[5]'}}
95
95
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
96
96
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
97
97
#pragma acc parallel reduction(+:CoCArr)
@@ -134,7 +134,7 @@ void uses(unsigned Parm) {
134
134
135
135
HasPtr HPArr[5];
136
136
// expected-error@+4{{invalid type 'int *' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
137
-
// expected-note@+3{{used as element type of array type 'HasPtr'}}
137
+
// expected-note@+3{{used as element type of array type 'HasPtr[5]'}}
138
138
// expected-note@#HASPTR{{used as field 'I' of composite 'HasPtr'}}
139
139
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
140
140
#pragma acc parallel reduction(+:HPArr)
@@ -150,7 +150,7 @@ void uses(unsigned Parm) {
150
150
#pragma acc parallel reduction(+:CplxI)
151
151
while (1);
152
152
// expected-error@+3{{invalid type '_Complex int' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
153
-
// expected-note@+2{{used as element type of array type '_Complex int'}}
153
+
// expected-note@+2{{used as element type of array type '_Complex int[5]'}}
154
154
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
155
155
#pragma acc parallel reduction(+:CplxIArr)
156
156
while (1);
@@ -159,7 +159,7 @@ void uses(unsigned Parm) {
159
159
#pragma acc parallel reduction(+:CplxF)
160
160
while (1);
161
161
// expected-error@+3{{invalid type '_Complex float' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
162
-
// expected-note@+2{{used as element type of array type '_Complex float'}}
162
+
// expected-note@+2{{used as element type of array type '_Complex float[5]'}}
163
163
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
164
164
#pragma acc parallel reduction(+:CplxFArr)
165
165
while (1);
@@ -240,6 +240,50 @@ void TemplUses(T Parm, U CoS, V ChC) {
240
240
// expected-error@+1{{OpenACC variable is not a valid variable name, sub-array, array element, or composite variable member}}
241
241
#pragma acc parallel reduction(&: ChCPtr->COS)
242
242
while (1);
243
+
244
+
T ThreeDArray[3][4][5];
245
+
246
+
// expected-error@+3{{invalid type 'int[4][5]' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
247
+
// expected-note@+2{{used as element type of array type 'int[3][4][5]'}}
248
+
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
249
+
#pragma acc parallel reduction(+:ThreeDArray)
250
+
while (1);
251
+
// expected-error@+3{{invalid type 'int[5]' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
252
+
// expected-note@+2{{used as element type of array type 'int[4][5]'}}
253
+
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
// expected-error@+3{{invalid type 'int[5]' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
257
+
// expected-note@+2{{used as element type of array type 'int[4][5]'}}
258
+
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
Copy file name to clipboardExpand all lines: clang/test/SemaOpenACC/loop-construct-reduction-clause.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ void uses() {
153
153
154
154
CompositeHasComposite CoCArr[5];
155
155
// expected-error@+4{{invalid type 'struct CompositeOfScalars' used in OpenACC 'reduction' variable reference; type is not a scalar value}}
156
-
// expected-note@+3{{used as element type of array type 'CompositeHasComposite'}}
156
+
// expected-note@+3{{used as element type of array type 'CompositeHasComposite[5]'}}
157
157
// expected-note@#COS_FIELD{{used as field 'COS' of composite 'CompositeHasComposite'}}
158
158
// expected-note@+1{{OpenACC 'reduction' variable reference must be a scalar variable or a composite of scalars, or an array, sub-array, or element of scalar types}}
0 commit comments