1*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify -x renderscript -D__RENDERSCRIPT__ %s 2*67e74705SXin Li // RUN: %clang_cc1 -fsyntax-only -verify -x c %s 3*67e74705SXin Li 4*67e74705SXin Li #ifndef __RENDERSCRIPT__ 5*67e74705SXin Li // expected-warning@+2 {{'kernel' attribute ignored}} 6*67e74705SXin Li #endif 7*67e74705SXin Li void __attribute__((kernel)) kernel() {} 8*67e74705SXin Li 9*67e74705SXin Li #ifndef __RENDERSCRIPT__ 10*67e74705SXin Li // expected-warning@+4 {{'kernel' attribute ignored}} 11*67e74705SXin Li #else 12*67e74705SXin Li // expected-warning@+2 {{'kernel' attribute only applies to functions}} 13*67e74705SXin Li #endif 14*67e74705SXin Li int __attribute__((kernel)) global; 15*67e74705SXin Li 16*67e74705SXin Li #ifndef __RENDERSCRIPT__ 17*67e74705SXin Li // expected-error@+2 {{function return value cannot have __fp16 type; did you forget * ?}} 18*67e74705SXin Li #endif 19*67e74705SXin Li __fp16 fp16_return(); 20*67e74705SXin Li 21*67e74705SXin Li #ifndef __RENDERSCRIPT__ 22*67e74705SXin Li // expected-error@+2 {{parameters cannot have __fp16 type; did you forget * ?}} 23*67e74705SXin Li #endif 24*67e74705SXin Li void fp16_arg(__fp16 p); 25