repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
tree-prof
/
prof-robust-1.c
blob
316cfc75734adb9e94f000538f3355f5ffb91d31
1
/* { dg-options "-O2 -w" } */
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
#ifdef _PROFILE_USE
7
int
foo
(
int
x
) {
8
return
3
*
x
;
9
}
10
#else
11
int
foo
(
int
x
) {
12
return
3
*
x
;
13
}
14
#endif
15
16
int
x
=
1000
;
17
18
int
main
(
int
argc
,
char
*
argv
[]) {
19
int
i
;
20
int
sum
=
0
;
21
for
(
i
=
0
;
i
<
x
;
i
++)
22
sum
+=
i
;
23
printf
(
"%d
\n
"
,
sum
);
24
return
0
;
25
}