mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Implement checking of the tail keyword.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104744 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -77,8 +77,20 @@ define void @not_vararg(i8* %p) nounwind {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: Undefined behavior: Branch to non-blockaddress
|
||||
define void @use_indbr() {
|
||||
indirectbr i8* bitcast (i32()* @foo to i8*), [label %block]
|
||||
block:
|
||||
unreachable
|
||||
}
|
||||
|
||||
; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
|
||||
; CHECK: Undefined behavior: Call with "tail" keyword references alloca or va_arg
|
||||
declare void @tailcallee(i8*)
|
||||
define void @use_tail(i8* %valist) {
|
||||
%t = alloca i8
|
||||
tail call void @tailcallee(i8* %t)
|
||||
%s = va_arg i8* %valist, i8*
|
||||
tail call void @tailcallee(i8* %s)
|
||||
ret void
|
||||
}
|
||||
|
Reference in New Issue
Block a user