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-20020904-1.c
blob
56509c12ed0e66f2f5a2ccda907bd25d31606ce5
1
/*
2
20020904-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
/* PR c/7102 */
12
13
/* Verify that GCC zero-extends integer constants
14
in unsigned binary operations. */
15
16
typedef
unsigned char
u8
;
17
18
u8
fun
(
u8 y
)
19
{
20
u8 x
=((
u8
)
255
)/
y
;
21
return
x
;
22
}
23
24
void
testTortureExecute
(
void
)
25
{
26
if
(
fun
((
u8
)
2
) !=
127
)
27
ASSERT
(
0
);
28
return
;
29
}