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/SemaOpenCL/builtins-amdgcn-error.cl
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -148,7 +148,8 @@ void test_s_setreg(int x, int y) {
148
148
voidtest_atomic_inc32() {
149
149
uintval=17;
150
150
val=__builtin_amdgcn_atomic_inc32(&val, val, __ATOMIC_SEQ_CST+1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
151
-
val=__builtin_amdgcn_atomic_inc32(&val, val, __ATOMIC_ACQUIRE-1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
val=__builtin_amdgcn_atomic_inc32(4); // expected-error {{too few arguments to function call, expected 4}}
153
154
val=__builtin_amdgcn_atomic_inc32(&val, val, 4, 4, 4, 4); // expected-error {{too many arguments to function call, expected 4}}
154
155
val=__builtin_amdgcn_atomic_inc32(&val, val, 3.14, ""); // expected-warning {{implicit conversion from 'double' to 'unsigned int' changes value from 3.14 to 3}}
@@ -162,7 +163,8 @@ void test_atomic_inc32() {
162
163
voidtest_atomic_inc64() {
163
164
__UINT64_TYPE__val=17;
164
165
val=__builtin_amdgcn_atomic_inc64(&val, val, __ATOMIC_SEQ_CST+1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
165
-
val=__builtin_amdgcn_atomic_inc64(&val, val, __ATOMIC_ACQUIRE-1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
val=__builtin_amdgcn_atomic_inc64(4); // expected-error {{too few arguments to function call, expected 4}}
167
169
val=__builtin_amdgcn_atomic_inc64(&val, val, 4, 4, 4, 4); // expected-error {{too many arguments to function call, expected 4}}
168
170
val=__builtin_amdgcn_atomic_inc64(&val, val, 3.14, ""); // expected-warning {{implicit conversion from 'double' to 'unsigned int' changes value from 3.14 to 3}}
@@ -176,7 +178,8 @@ void test_atomic_inc64() {
176
178
voidtest_atomic_dec32() {
177
179
uintval=17;
178
180
val=__builtin_amdgcn_atomic_dec32(&val, val, __ATOMIC_SEQ_CST+1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
179
-
val=__builtin_amdgcn_atomic_dec32(&val, val, __ATOMIC_ACQUIRE-1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
val=__builtin_amdgcn_atomic_dec32(4); // expected-error {{too few arguments to function call, expected 4}}
181
184
val=__builtin_amdgcn_atomic_dec32(&val, val, 4, 4, 4, 4); // expected-error {{too many arguments to function call, expected 4}}
182
185
val=__builtin_amdgcn_atomic_dec32(&val, val, 3.14, ""); // expected-warning {{implicit conversion from 'double' to 'unsigned int' changes value from 3.14 to 3}}
@@ -190,7 +193,8 @@ void test_atomic_dec32() {
190
193
voidtest_atomic_dec64() {
191
194
__UINT64_TYPE__val=17;
192
195
val=__builtin_amdgcn_atomic_dec64(&val, val, __ATOMIC_SEQ_CST+1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
193
-
val=__builtin_amdgcn_atomic_dec64(&val, val, __ATOMIC_ACQUIRE-1, "workgroup"); // expected-warning {{memory order argument to atomic operation is invalid}}
val=__builtin_amdgcn_atomic_dec64(4); // expected-error {{too few arguments to function call, expected 4}}
195
199
val=__builtin_amdgcn_atomic_dec64(&val, val, 4, 4, 4, 4); // expected-error {{too many arguments to function call, expected 4}}
196
200
val=__builtin_amdgcn_atomic_dec64(&val, val, 3.14, ""); // expected-warning {{implicit conversion from 'double' to 'unsigned int' changes value from 3.14 to 3}}
0 commit comments