diff options
| author | Anders Carlsson <andersca@mac.com> | 2009-09-02 21:14:47 +0000 |
|---|---|---|
| committer | Anders Carlsson <andersca@mac.com> | 2009-09-02 21:14:47 +0000 |
| commit | 35dca26835572bb7e5e0e46a5ba745814d702691 (patch) | |
| tree | 1c544b43db870bac30a2949691ee36e970629db6 /clang/test | |
| parent | 3a964ebdc4e44e6adc1e0c4e7671db59a789b7bc (diff) | |
| download | bcm5719-llvm-35dca26835572bb7e5e0e46a5ba745814d702691.tar.gz bcm5719-llvm-35dca26835572bb7e5e0e46a5ba745814d702691.zip | |
Fix an assertion when initializing a union using a member initializer. (We weren't casting from the union type to the initializer type correctly).
llvm-svn: 80837
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/anonymous-union-member-initializer.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/anonymous-union-member-initializer.cpp b/clang/test/CodeGenCXX/anonymous-union-member-initializer.cpp new file mode 100644 index 00000000000..2030f4053c9 --- /dev/null +++ b/clang/test/CodeGenCXX/anonymous-union-member-initializer.cpp @@ -0,0 +1,12 @@ +// RUN: clang-cc -emit-llvm -o - %s + +struct A { + union { + int a; + void* b; + }; + + A() : a(0) { } +}; + +A a; |

