diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-29 22:35:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-29 22:35:55 +0000 |
commit | ca29178bb900624443d7a30b6b7ba3c0921d5123 (patch) | |
tree | 3b20a1c760826a554cddf2172bbff2f265103aef /test | |
parent | 9c95e52c08594c50c841a6b8fad7e01ac14347ae (diff) | |
download | llvm-ca29178bb900624443d7a30b6b7ba3c0921d5123.tar.gz llvm-ca29178bb900624443d7a30b6b7ba3c0921d5123.tar.bz2 llvm-ca29178bb900624443d7a30b6b7ba3c0921d5123.tar.xz |
This node should not be incomplete!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Analysis/DSGraph/2003-06-29-IncompleteTDPass.ll | 26 | ||||
-rw-r--r-- | test/Analysis/DSGraph/PhysicalSubtyping.ll | 18 |
2 files changed, 44 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/2003-06-29-IncompleteTDPass.ll b/test/Analysis/DSGraph/2003-06-29-IncompleteTDPass.ll new file mode 100644 index 0000000000..4b146a1592 --- /dev/null +++ b/test/Analysis/DSGraph/2003-06-29-IncompleteTDPass.ll @@ -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 +} diff --git a/test/Analysis/DSGraph/PhysicalSubtyping.ll b/test/Analysis/DSGraph/PhysicalSubtyping.ll new file mode 100644 index 0000000000..d9ac454522 --- /dev/null +++ b/test/Analysis/DSGraph/PhysicalSubtyping.ll @@ -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 +} |