Skip to content

Commit 47da2c8

Browse files
authored
[SYCLomatic #936] Add test for __assert_fail/__assertfail (#596)
Signed-off-by: Ziran Zhang <[email protected]>
1 parent eb8fbf2 commit 47da2c8

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

features/feature_case/misc/assert.cu

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// ====------ assert.cu---------- *- CUDA -* ----===////
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//
8+
// ===----------------------------------------------------------------------===//
9+
10+
__global__ void kernel() {
11+
__assertfail("", __FILE__, __LINE__, __func__, sizeof(char));
12+
}
13+
14+
int main() {
15+
kernel<<<1, 64>>>();
16+
return 0;
17+
}

features/features.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,5 +324,6 @@
324324
<!-- <test testName="wmma" configFile="config/TEMPLATE_wmma.xml" /> -->
325325
<test testName="peer_access" configFile="config/TEMPLATE_peer_access.xml" />
326326
<test testName="const_opt" configFile="config/TEMPLATE_const_opt.xml" />
327+
<test testName="assert" configFile="config/TEMPLATE_misc.xml" />
327328
</tests>
328329
</suite>

0 commit comments

Comments
 (0)