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-pr37931.c
blob
c1ea06cd8be57235ca41d1055f3b8bd0de09a531
1
/*
2
pr37931.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
/* PR middle-end/37931 */
12
13
14
int
15
foo
(
int
a
,
unsigned int
b
)
16
{
17
return
(
a
|
1
) & (
b
|
1
);
18
}
19
20
void
21
testTortureExecute
(
void
)
22
{
23
if
(
foo
(
6
,
0xc6
) !=
7
)
24
ASSERT
(
0
);
25
if
(
foo
(
0x80
,
0xc1
) !=
0x81
)
26
ASSERT
(
0
);
27
if
(
foo
(
4
,
4
) !=
5
)
28
ASSERT
(
0
);
29
if
(
foo
(
5
,
4
) !=
5
)
30
ASSERT
(
0
);
31
return
;
32
}