summaryrefslogtreecommitdiffstats
path: root/test/SemaCUDA/kernel-call.cu
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCUDA/kernel-call.cu')
-rw-r--r--test/SemaCUDA/kernel-call.cu8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/SemaCUDA/kernel-call.cu b/test/SemaCUDA/kernel-call.cu
index 6d51695..7bc7ae1 100644
--- a/test/SemaCUDA/kernel-call.cu
+++ b/test/SemaCUDA/kernel-call.cu
@@ -8,8 +8,16 @@ template <typename T> void t1(T arg) {
g1<<<arg, arg>>>(1);
}
+void h1(int x) {}
+int h2(int x) { return 1; }
+
int main(void) {
g1<<<1, 1>>>(42);
t1(1);
+
+ h1<<<1, 1>>>(42); // expected-error {{kernel call to non-global function h1}}
+
+ int (*fp)(int) = h2;
+ fp<<<1, 1>>>(42); // expected-error {{must have void return type}}
}
OpenPOWER on IntegriCloud