summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/cast-emit.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/cast-emit.c')
-rw-r--r--clang/test/CodeGen/cast-emit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGen/cast-emit.c b/clang/test/CodeGen/cast-emit.c
new file mode 100644
index 0000000..4e33fa3
--- /dev/null
+++ b/clang/test/CodeGen/cast-emit.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+typedef union {
+ int i;
+ float f;
+} MyUnion;
+void unionf(MyUnion a);
+void uniontest(float a) {
+ f((MyUnion)1.0f);
+// CHECK: store float 1.000000e+00
+}
+