Shrink Thumb2 movcc instructions.
[llvm/avr.git] / test / FrontendC / 2007-09-20-GcrootAttribute.c
blob23cd37ff6a55a0e1c58049ce36caef53e852b7c2
1 // RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot
2 // RUN: %llvmgcc -S -emit-llvm %s -o - | grep llvm.gcroot | count 6
3 // RUN: %llvmgcc -S -emit-llvm %s -o - | llvm-as
5 typedef struct foo_s
7 int a;
8 } foo, __attribute__ ((gcroot)) *foo_p;
10 foo my_foo;
12 int alpha ()
14 foo my_foo2 = my_foo;
16 return my_foo2.a;
19 int bar (foo a)
21 foo_p b;
22 return b->a;
25 foo_p baz (foo_p a, foo_p b, foo_p *c)
27 a = b = *c;
28 return a;