diff options
author | Egor Churaev <egor.churaev@intel.com> | 2017-05-25 07:18:37 +0000 |
---|---|---|
committer | Egor Churaev <egor.churaev@intel.com> | 2017-05-25 07:18:37 +0000 |
commit | 3f8116e6a2815b1d5f3491493938d0c63c9f42c9 (patch) | |
tree | 9ec59d6a54862e618647f1e099b6b6557ba64438 /test/SemaOpenCL | |
parent | 6fc696b9ad51eb3e3db7508763bbce3c970faac7 (diff) |
[OpenCL] reserve_id_t cannot be used as argument to kernel function
Reviewers: Anastasia
Reviewed By: Anastasia
Subscribers: yaxunl, cfe-commits, bader
Differential Revision: https://reviews.llvm.org/D33483
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303846 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r-- | test/SemaOpenCL/invalid-pipes-cl2.0.cl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaOpenCL/invalid-pipes-cl2.0.cl b/test/SemaOpenCL/invalid-pipes-cl2.0.cl index 5db953108b..a50811650d 100644 --- a/test/SemaOpenCL/invalid-pipes-cl2.0.cl +++ b/test/SemaOpenCL/invalid-pipes-cl2.0.cl @@ -3,6 +3,11 @@ global pipe int gp; // expected-error {{type '__global read_only pipe int' can only be used as a function parameter in OpenCL}} global reserve_id_t rid; // expected-error {{the '__global reserve_id_t' type cannot be used to declare a program scope variable}} +extern pipe write_only int get_pipe(); // expected-error {{type '__global write_only pipe int ()' can only be used as a function parameter in OpenCL}} + +kernel void test_invalid_reserved_id(reserve_id_t ID) { // expected-error {{'reserve_id_t' cannot be used as the type of a kernel parameter}} +} + void test1(pipe int *p) {// expected-error {{pipes packet types cannot be of reference type}} } void test2(pipe p) {// expected-error {{missing actual type specifier for pipe}} |