diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-06-06 20:12:37 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-06-06 20:12:37 +0000 |
commit | c55f98dbdffb73894a8dbe7b0ce176604fe42127 (patch) | |
tree | c2a5aadba4c059238eceb9bca7d8112b29e14bd4 /test/CodeGen/empty-union-init.c | |
parent | 400d95fb7bb9fac609f8613862b84f3a2a7d510f (diff) |
Reorganize this loop a bit so it doesn't crash for empty unions. Fixes
PR2419.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@52060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/empty-union-init.c')
-rw-r--r-- | test/CodeGen/empty-union-init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/empty-union-init.c b/test/CodeGen/empty-union-init.c new file mode 100644 index 0000000000..6b8def9a64 --- /dev/null +++ b/test/CodeGen/empty-union-init.c @@ -0,0 +1,12 @@ +// RUN: clang -emit-llvm < %s -o - + +struct Mem { + union { + } u; +}; + +struct Mem *columnMem(){ + static const struct Mem nullMem = { {} }; +} + + |