about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
-rw-r--r--test/regression/2019-05-31_simple-unknown-bitcast-alias.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/regression/2019-05-31_simple-unknown-bitcast-alias.ll b/test/regression/2019-05-31_simple-unknown-bitcast-alias.ll
new file mode 100644
index 00000000..ea164308
--- /dev/null
+++ b/test/regression/2019-05-31_simple-unknown-bitcast-alias.ll
@@ -0,0 +1,22 @@
+; RUN: %llvmas %s -o=%t.bc
+; RUN: rm -rf %t.klee-out
+; RUN: %klee -output-source -output-dir=%t.klee-out %t.bc
+
+; bitcast of @foo2, which is not known yet
+@foo3 = alias i16 (...), bitcast (i32 (...)* @foo2 to i16 (...)*)
+; @foo is not known yet
+@foo2 = alias i32 (...), i32 (...)* @foo
+@foo = alias i32 (...), bitcast (i32 ()* @__foo to i32 (...)*)
+
+define i32 @__foo() {
+entry:
+  ret i32 42
+}
+
+define i32 @main() {
+entry:
+  call i32 (...) @foo()
+  call i32 (...) @foo2()
+  call i16 (...) @foo3()
+  ret i32 0
+}