commit | e504170f688b0e2113011839b933a4ec450b5182 | [log] [tgz] |
---|---|---|
author | Fariborz Jahanian <fjahanian@apple.com> | Fri Nov 06 20:47:40 2009 +0000 |
committer | Fariborz Jahanian <fjahanian@apple.com> | Fri Nov 06 20:47:40 2009 +0000 |
tree | 07d67d586a5b2cc9aa31989de68651782ed04be5 | |
parent | 7344c878a73418cfade56e0c2281ac7324a609b2 [diff] [blame] |
Prevent a code gen. crash on empty unions - pr5408. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86287 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGenCXX/empty-union.cpp b/test/CodeGenCXX/empty-union.cpp new file mode 100644 index 0000000..fdd9741 --- /dev/null +++ b/test/CodeGenCXX/empty-union.cpp
@@ -0,0 +1,10 @@ +// RUN: clang-cc -emit-llvm -o - %s + +union sigval { }; + +union sigval sigev_value; + +int main() +{ + return sizeof(sigev_value); +}