From d528660759e8f116dab3173a56a4aabd2390c596 Mon Sep 17 00:00:00 2001 From: Stuart Hastings Date: Wed, 9 Mar 2011 03:59:52 +0000 Subject: [PATCH] Test cases for r127309. llvm-svn: 127310 --- llvm/test/FrontendC/2011-03-02-UnionInitializer.c | 2 ++ llvm/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 llvm/test/FrontendC/2011-03-02-UnionInitializer.c create mode 100644 llvm/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c diff --git a/llvm/test/FrontendC/2011-03-02-UnionInitializer.c b/llvm/test/FrontendC/2011-03-02-UnionInitializer.c new file mode 100644 index 000000000000..a5ea75e08c01 --- /dev/null +++ b/llvm/test/FrontendC/2011-03-02-UnionInitializer.c @@ -0,0 +1,2 @@ +// RUN: %llvmgcc -S %s +union { int :3; double f; } u17_017 = {17.17}; diff --git a/llvm/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c b/llvm/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c new file mode 100644 index 000000000000..30a715bd46f2 --- /dev/null +++ b/llvm/test/FrontendC/2011-03-08-ZeroFieldUnionInitializer.c @@ -0,0 +1,6 @@ +typedef struct { + union { + struct { } __attribute((packed)); + }; +} fenv_t; +const fenv_t _FE_DFL_ENV = {{{ 0, 0, 0, 0 }}};