projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove explicit uses of -emit-llvm, the test infrastructure adds it
[oota-llvm.git]
/
test
/
FrontendC
/
2007-09-20-GcrootAttribute.c
1
// RUN: %llvmgcc -S %s -o - | grep llvm.gcroot
2
// RUN: %llvmgcc -S %s -o - | grep llvm.gcroot | count 6
3
// RUN: %llvmgcc -S %s -o - | llvm-as
4
5
typedef struct foo_s
6
{
7
int a;
8
} foo, __attribute__ ((gcroot)) *foo_p;
9
10
foo my_foo;
11
12
int alpha ()
13
{
14
foo my_foo2 = my_foo;
15
16
return my_foo2.a;
17
}
18
19
int bar (foo a)
20
{
21
foo_p b;
22
return b->a;
23
}
24
25
foo_p baz (foo_p a, foo_p b, foo_p *c)
26
{
27
a = b = *c;
28
return a;
29
}