aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/GlobalDCE/2002-07-17-CastRef.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Transforms/GlobalDCE/2002-07-17-CastRef.ll b/test/Transforms/GlobalDCE/2002-07-17-CastRef.ll
new file mode 100644
index 0000000000..d68d3930c6
--- /dev/null
+++ b/test/Transforms/GlobalDCE/2002-07-17-CastRef.ll
@@ -0,0 +1,12 @@
+; RUN: as < %s | opt -globaldce
+;
+implementation
+
+internal void %func() { ; Not dead, can be reachable via X
+ ret void
+}
+
+void %main() {
+ %X = cast void()* %func to int*
+ ret void
+}