1 // RUN: %llvmgxx -S -O0 -emit-llvm %s -o - | grep {retval\\|memtmp} | grep S242 | \
2 // RUN: grep {i32 1} | count 1
4 // Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of
5 // ret in check93 are copied (the same LLVM struct is used for both).
7 typedef __builtin_va_list va_list;
8 typedef unsigned long size_t;
9 void *memset(void *, int, size_t);
10 struct S92 { int a:14; } ;
11 extern struct S92 s92;
13 struct S92 check92 () { struct S92 ret;
14 memset (&ret, 0, sizeof (ret));
18 struct S93 { __attribute__((aligned (8))) void * a; } ;
19 extern struct S93 s93;
20 struct S93 check93 () {
22 memset (&ret, 0, sizeof (ret));
26 struct S242 { char * a;int b[1]; } ;
27 extern struct S242 s242;
29 struct S242 check242 () {
31 memset (&ret, 0, sizeof (ret));
36 void check93va (int z, ...) {
39 __builtin_va_start(ap,z);
40 arg = __builtin_va_arg(ap,struct S93);
41 __builtin_va_end(ap); }
43 void check242va (int z, ...) {
46 __builtin_va_start(ap,z);
47 arg = __builtin_va_arg(ap,struct S242);
48 __builtin_va_end(ap); }