1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00
Lang Hames 75b432e448 [ExecutionEngine][Interpreter] Fix out-of-bounds array access.
If args is empty then accesing element 0 is illegal.

https://reviews.llvm.org/D53556

Patch by Eugene Sharygin. Thanks Eugene!

llvm-svn: 347281
2018-11-20 01:01:26 +00:00

11 lines
169 B
LLVM

; RUN: %lli -force-interpreter %s
declare void @exit(i32)
declare i32 @rand()
define i32 @main() {
%ret = call i32 @rand()
call void @exit(i32 0)
ret i32 %ret
}