aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/DSGraph/PhysicalSubtyping.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/DSGraph/PhysicalSubtyping.ll')
-rw-r--r--test/Analysis/DSGraph/PhysicalSubtyping.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Analysis/DSGraph/PhysicalSubtyping.ll b/test/Analysis/DSGraph/PhysicalSubtyping.ll
new file mode 100644
index 0000000..d9ac454
--- /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
+}