diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-08 21:08:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-08 21:08:07 +0000 |
commit | b35baae19b906245b5c2266b47ef411abcc6b25a (patch) | |
tree | 7759f48f8b56dded3d82d83c6aebfe6f4899c5d6 /test/CodeGen/init.c | |
parent | 503524acc73f2f8280080ca0d200377406001b65 (diff) |
add a codegen hack to work around an AST bug, allowing us to compile the
code in PR6537. This should be reverted when the ast bug is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97981 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/init.c')
-rw-r--r-- | test/CodeGen/init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c index f6b3536157..13ffad1731 100644 --- a/test/CodeGen/init.c +++ b/test/CodeGen/init.c @@ -29,3 +29,14 @@ int f4() { static const int g4 = 12; return g4; } + +// PR6537 +typedef union vec3 { + struct { double x, y, z; }; + double component[3]; +} vec3; +vec3 f5(vec3 value) { + return (vec3) {{ + .x = value.x + }}; +} |