repo.or.cz
/
binutils-gdb.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Re-add support for lbarx, lharx, stbcx. and sthcx. insns back to the E6500 cpu.
[binutils-gdb.git]
/
ld
/
testsuite
/
ld-ifunc
/
ifunc-main.c
blob
61e9934ae5dc836ff770747d2cce7d8453582c17
1
#include <stdio.h>
2
3
extern
int
foo
(
void
);
4
extern
int
bar
(
void
);
5
6
typedef
int
(*
func_p
) (
void
);
7
8
func_p foo_ptr
=
foo
;
9
10
func_p
11
__attribute__
((
noinline
))
12
get_bar
(
void
)
13
{
14
return
bar
;
15
}
16
17
int
18
main
(
void
)
19
{
20
func_p bar_ptr
=
get_bar
();
21
if
(
bar_ptr
!=
bar
)
22
__builtin_abort
();
23
if
(
bar_ptr
() != -
1
)
24
__builtin_abort
();
25
if
(
bar
() != -
1
)
26
__builtin_abort
();
27
28
if
(
foo_ptr
!=
foo
)
29
__builtin_abort
();
30
if
(
foo_ptr
() !=
1
)
31
__builtin_abort
();
32
if
(
foo
() !=
1
)
33
__builtin_abort
();
34
35
printf
(
"OK
\n
"
);
36
37
return
0
;
38
}