1 // RUN: %clang_cc1 -fsyntax-only -verify -x renderscript -D__RENDERSCRIPT__ %s
2 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify -x c %s
3 // REQUIRES: x86-registered-target
5 #ifndef __RENDERSCRIPT__
6 // expected-warning@+2 {{'kernel' attribute ignored}}
8 void __attribute__((kernel)) kernel(void) {}
10 #ifndef __RENDERSCRIPT__
11 // expected-warning@+4 {{'kernel' attribute ignored}}
13 // expected-warning@+2 {{'kernel' attribute only applies to functions}}
15 int __attribute__((kernel)) global;
17 #ifndef __RENDERSCRIPT__
18 // expected-error@+2 {{function return value cannot have __fp16 type; did you forget * ?}}
20 __fp16 fp16_return(void);
22 #ifndef __RENDERSCRIPT__
23 // expected-error@+2 {{parameters cannot have __fp16 type; did you forget * ?}}
25 void fp16_arg(__fp16 p);