This node should not be incomplete!

llvm-svn: 6984
This commit is contained in:
Chris Lattner 2003-06-29 22:35:55 +00:00
parent c0f4dc1cfa
commit 10db1077ff
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,26 @@
; RUN: analyze %s -datastructure-gc -dsgc-dspass=td -dsgc-abort-if-incomplete=Ptr
int %main() {
call void %A()
call void %B()
ret int 0
}
internal void %A() {
%V = malloc int
call void %Callee(int* %V)
ret void
}
internal void %B() {
%V = malloc int
call void %Callee(int* %V)
ret void
}
internal void %Callee(int* %Ptr) {
load int* %Ptr
ret void
}

View File

@ -0,0 +1,18 @@
; Test to check for support for "physical subtyping"
;
; RUN: analyze %s -datastructure-gc -dsgc-abort-if-any-collapsed
;
%S = type { int }
%T = type { int, float, double }
int %main() {
%A = alloca %S
%Ap = getelementptr %S* %A, long 0, ubyte 0
%B = alloca %T
%Bp = getelementptr %T* %B, long 0, ubyte 0
%C = alloca int*
store int* %Ap, int** %C
store int* %Bp, int** %C
ret int 0
}