projects
/
deliverable
/
binutils-gdb.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Update MIPS PIE tests for DF_1_PIE change
[deliverable/binutils-gdb.git]
/
ld
/
testsuite
/
ld-ifunc
/
ifunc-main.c
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
}
This page took
0.029443 seconds
and
4
git commands to generate.