repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-20060102-1.c
blob
b9cca9f007d6c43e147978dc0ea17f33644f4a35
1
/*
2
20060102-1.c from the execute part of the gcc torture suite.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
#include <limits.h>
12
13
int
f
(
int
x
)
14
{
15
return
(
x
>> (
sizeof
(
x
) *
CHAR_BIT
-
1
)) ? -
1
:
1
;
16
}
17
18
volatile
int
one
=
1
;
19
void
testTortureExecute
(
void
)
20
{
21
/* Test that the function above returns different values for
22
different signs. */
23
if
(
f
(
one
) ==
f
(-
one
))
24
ASSERT
(
0
);
25
return
;
26
}
27