testcases for undefined and unreachable

llvm-svn: 17058
This commit is contained in:
Chris Lattner 2004-10-16 18:24:11 +00:00
parent 3a1215ce83
commit 7900435c81
2 changed files with 28 additions and 0 deletions

15
test/Feature/undefined.ll Normal file
View File

@ -0,0 +1,15 @@
%X = global int undef
implementation
declare int "atoi"(sbyte *)
int %test() {
ret int undef
}
int %test2() {
%X = add int undef, 1
ret int %X
}

View File

@ -0,0 +1,13 @@
implementation
declare void %bar()
int %foo() { ;; Calling this function has undefined behavior
unreachable
}
double %xyz() {
call void %bar()
unreachable ;; Bar must not return.
}