diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-05-27 15:51:49 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-05-27 15:51:49 +0000 |
commit | 21911e89d55da3a47eb02fceb85dbd5c5294bc11 (patch) | |
tree | 93463007a02bae9304875776bc5b4d4d8a03af80 /clang/test/CodeGen/struct.c | |
parent | 5e2281ede8364dd7d2af7c9a0e4dd15ad6653fdd (diff) | |
download | bcm5719-llvm-21911e89d55da3a47eb02fceb85dbd5c5294bc11.tar.gz bcm5719-llvm-21911e89d55da3a47eb02fceb85dbd5c5294bc11.zip |
A few more cases for aggregate values.
llvm-svn: 51596
Diffstat (limited to 'clang/test/CodeGen/struct.c')
-rw-r--r-- | clang/test/CodeGen/struct.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGen/struct.c b/clang/test/CodeGen/struct.c index 1b476f823d5..a081ef13132 100644 --- a/clang/test/CodeGen/struct.c +++ b/clang/test/CodeGen/struct.c @@ -145,3 +145,17 @@ struct a14 { short a; int b; } x = {1, 1}; /* flexible array members */ struct a15 {char a; int b[];} c15; int a16(void) {c15.a = 1;} + +/* compound literals */ +void f13() +{ + a13 x; x = (a13){1,2}; +} + +/* va_arg */ +int f14(int i, ...) { + __builtin_va_list l; + __builtin_va_start(l,i); + a13 b = __builtin_va_arg(l, a13); + return b.b; +} |