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
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-920730-1.c
blob
e1063d265d39c71ff9ee71d43fd0f37a2610d1d2
1
/*
2
920730-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
/* 920730-1.c */
12
#include <limits.h>
13
int
f1
()
14
{
15
int
b
=
INT_MIN
;
16
return
b
>=
INT_MIN
;
17
}
18
19
int
f2
()
20
{
21
int
b
=
INT_MIN
+
1
;
22
return
b
>= (
unsigned
)(
INT_MAX
+
2
);
23
}
24
25
int
f3
()
26
{
27
int
b
=
INT_MAX
;
28
return
b
>=
INT_MAX
;
29
}
30
31
int
f4
()
32
{
33
int
b
=-
1
;
34
return
b
>=
UINT_MAX
;
35
}
36
37
void
38
testTortureExecute
(
void
)
39
{
40
if
((
f1
()&
f2
()&
f3
()&
f4
())!=
1
)
41
ASSERT
(
0
);
42
return
;
43
}
44