xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2002-12-15-StructParameters.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s  -o /dev/null
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc typedef struct
4*f4a2713aSLionel Sambuc {
5*f4a2713aSLionel Sambuc   void *stack;
6*f4a2713aSLionel Sambuc   unsigned size;
7*f4a2713aSLionel Sambuc   unsigned avail;
8*f4a2713aSLionel Sambuc } compile_stack_type;
9*f4a2713aSLionel Sambuc 
10*f4a2713aSLionel Sambuc void foo(void*);
11*f4a2713aSLionel Sambuc void bar(compile_stack_type T, unsigned);
12*f4a2713aSLionel Sambuc 
test()13*f4a2713aSLionel Sambuc void test() {
14*f4a2713aSLionel Sambuc   compile_stack_type CST;
15*f4a2713aSLionel Sambuc   foo(&CST);
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc   bar(CST, 12);
18*f4a2713aSLionel Sambuc }
19