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
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
builtins
/
abs-1-lib.c
blob
57446b263c9d1ab4e1de00711c350a9cb648c6c7
1
extern
void
abort
(
void
);
2
extern
int
abs_called
;
3
extern
int
inside_main
;
4
5
/* The labs call should have been optimized, but the abs call
6
shouldn't have been. */
7
8
int
9
abs
(
int
x
)
10
{
11
if
(
inside_main
)
12
abs_called
=
1
;
13
return
(
x
<
0
? -
x
:
x
);
14
}
15
16
long
17
labs
(
long
x
)
18
{
19
if
(
inside_main
)
20
abort
();
21
return
(
x
<
0
? -
x
:
x
);
22
}