Skip to content

Commit 4f11b9c

Browse files
[SYCL] Adds test for building a simple SYCL program with -g and optimizations (intel#279)
Signed-off-by: Steffen Larsen <steffen.larsen@codeplay.com>
1 parent 9c22cff commit 4f11b9c

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O0 -o %t.out
2+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O1 -o %t.out
3+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O2 -o %t.out
4+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O3 -o %t.out
5+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Ofast -o %t.out
6+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Os -o %t.out
7+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Oz -o %t.out
8+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -Og -o %t.out
9+
// RUN: %clangxx %debug_option -fsycl -fsycl-targets=%sycl_triple %s -O -o %t.out
10+
11+
// NOTE: Tests that debugging information can be generated for all optimization
12+
// levels.
13+
14+
#include <CL/sycl.hpp>
15+
16+
int main() {
17+
sycl::queue q;
18+
19+
q.submit([&](sycl::handler &cgh) {
20+
cgh.parallel_for<class kernel_test>(100, [=](sycl::id<1> idx) {});
21+
});
22+
q.wait();
23+
24+
return 0;
25+
}

0 commit comments

Comments
 (0)