Debian Codegraph @

clang/test/SemaHIP/amdgpu-flat-atomic-fmin-err.hip

raw
1 // RUN: %clang_cc1 -fsyntax-only -triple amdgcn -target-cpu gfx942 -verify %s -fcuda-is-device
2 // RUN: %clang_cc1 -fsyntax-only -triple x86_64 -aux-triple amdgcn -verify %s
3
4 #define __device__ __attribute__((device))
5
6 __device__ void test_flat_atomic_fmin_f64_valid(double *ptr, double val) {
7 double result;
8 result = __builtin_amdgcn_flat_atomic_fmin_f64(ptr, val);
9 }
10
11 __device__ void test_flat_atomic_fmin_f64_errors(double *ptr, double val,
12 float *ptr_f) {
13 double result;
14 result = __builtin_amdgcn_flat_atomic_fmin_f64(ptr, val, 0); // expected-error{{too many arguments to function call, expected 2, have 3}}
15 result = __builtin_amdgcn_flat_atomic_fmin_f64(ptr_f, val); // expected-error{{cannot initialize a parameter of type}}
16 }
17