diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2010-02-23 17:58:35 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2010-02-23 17:58:35 +0000 |
commit | 18da88a38b82132faa7794120e17352dfacc5155 (patch) | |
tree | d43487476318249557ed0657a399bfeaadacfad4 /test/CodeGen | |
parent | 33efe2f088ae40b5129fe4ab021912e80129e155 (diff) |
PR6386: Fix a recent regression in IRGen of cast-to-union constructs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/cast-emit.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/cast-emit.c b/test/CodeGen/cast-emit.c new file mode 100644 index 0000000000..4e33fa32f7 --- /dev/null +++ b/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 +} + |