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