From fd1e32b1f3f2acbd4a4feb6dc845a6da7b1b84a8 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 6 Jun 2008 20:12:37 +0000 Subject: Reorganize this loop a bit so it doesn't crash for empty unions. Fixes PR2419. llvm-svn: 52060 --- clang/test/CodeGen/empty-union-init.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 clang/test/CodeGen/empty-union-init.c (limited to 'clang/test') diff --git a/clang/test/CodeGen/empty-union-init.c b/clang/test/CodeGen/empty-union-init.c new file mode 100644 index 00000000000..6b8def9a643 --- /dev/null +++ b/clang/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 = { {} }; +} + + -- cgit v1.2.3