1 // RUN: %clang_cc1 -triple x86_64-unknown-gnu-linux -aux-triple amdgcn-amd-amdhsa \ 2 // RUN: -verify -fsyntax-only -x hip %s 3 4 #include "Inputs/cuda.h" 5 6 __global__ void kern1(); 7 int y; 8 fun1()9void fun1() { 10 int x; 11 const char *p; 12 p = __builtin_get_device_side_mangled_name(); 13 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 14 p = __builtin_get_device_side_mangled_name(kern1, kern1); 15 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 16 p = __builtin_get_device_side_mangled_name(1); 17 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 18 p = __builtin_get_device_side_mangled_name(x); 19 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 20 p = __builtin_get_device_side_mangled_name(fun1); 21 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 22 p = __builtin_get_device_side_mangled_name(y); 23 // expected-error@-1 {{invalid argument: symbol must be a device-side function or global variable}} 24 } 25