aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/DSGraph
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-06-30 03:25:53 +0000
committerChris Lattner <sabre@nondot.org>2003-06-30 03:25:53 +0000
commit4f00818cd990a15e00e716ef444bd3a672372318 (patch)
treec56d4d0dbaf2b5101d733d98086ebda54892b221 /test/Analysis/DSGraph
parent5a540633036ccd7482bd8e83913304a4ed3fc11c (diff)
downloadexternal_llvm-4f00818cd990a15e00e716ef444bd3a672372318.zip
external_llvm-4f00818cd990a15e00e716ef444bd3a672372318.tar.gz
external_llvm-4f00818cd990a15e00e716ef444bd3a672372318.tar.bz2
New testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/DSGraph')
-rw-r--r--test/Analysis/DSGraph/SCCSimpleExample.ll25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/SCCSimpleExample.ll b/test/Analysis/DSGraph/SCCSimpleExample.ll
new file mode 100644
index 0000000..3c71c34
--- /dev/null
+++ b/test/Analysis/DSGraph/SCCSimpleExample.ll
@@ -0,0 +1,25 @@
+
+; RUN: analyze %s -datastructure-gc --dsgc-abort-if-merged=Y,BVal
+
+implementation
+
+internal void %F1(int* %X) {
+ %Y = alloca int
+ store int 4, int* %Y
+ %BVal = call int* %F2(int* %Y)
+ ret void
+}
+
+internal int* %F2(int* %A) {
+ %B = malloc int
+ store int 4, int* %B
+ call void %F1(int* %B)
+ ret int* %B
+}
+
+int %main() {
+ %Q = malloc int
+ store int 4, int* %Q
+ call void %F1(int* %Q)
+ ret int 0
+}