repo.or.cz
/
llvm
/
stm8.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
the various ConstantExpr::get*Ty methods existed to work with issues around
[llvm/stm8.git]
/
test
/
FrontendC
/
2007-09-20-GcrootAttribute.c
blob
b67b474c4c1bb51baddab57f491216ebff55925c
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
}