1 // RUN: %llvmgxx -S -O1 -m32 -emit-llvm %s -o - | grep {store i32} | count 1
3 // Test that all 8 bytes of ret in check242 are copied, and only 4 bytes of
4 // ret in check93 are copied (the same LLVM struct is used for both).
6 typedef __builtin_va_list va_list;
7 typedef unsigned long size_t;
8 void *memset(void *, int, size_t);
10 struct S93 { __attribute__((aligned (8))) void * a; } ;
11 extern struct S93 s93;
12 struct S93 check93 () {
14 memset (&ret, 0, sizeof (ret));
18 struct S242 { char * a;int b[1]; } ;
19 extern struct S242 s242;
21 struct S242 check242 () {
23 memset (&ret, 0, sizeof (ret));
28 void check93va (int z, ...) {
31 __builtin_va_start(ap,z);
32 arg = __builtin_va_arg(ap,struct S93);
33 __builtin_va_end(ap); }
35 void check242va (int z, ...) {
38 __builtin_va_start(ap,z);
39 arg = __builtin_va_arg(ap,struct S242);
40 __builtin_va_end(ap); }