Skip to content

Commit 5a513a1

Browse files
committed
Add test for wrong declaration type for __safestack_unsafe_stack_ptr
1 parent 1288fee commit 5a513a1

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
2+
; RUN: not --crash opt -passes=safe-stack -mtriple=x86_64-pc-linux-gnu -disable-output %s 2>&1 | FileCheck %s
3+
4+
target datalayout = "A5"
5+
6+
; Declaration of __safestack_unsafe_stack_ptr already exists with wrong address space
7+
@__safestack_unsafe_stack_ptr = external thread_local(initialexec) global ptr
8+
9+
; CHECK: LLVM ERROR: __safestack_unsafe_stack_ptr must have void* type
10+
11+
define void @alloca_addrspace() nounwind uwtable safestack {
12+
%a = alloca i8, align 8, addrspace(5)
13+
call void @Capture_as5(ptr addrspace(5) %a)
14+
ret void
15+
}
16+
17+
declare void @Capture_as5(ptr addrspace(5))

0 commit comments

Comments
 (0)