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-20111227-1.c
blob
6844746946bd7657cd243d744e2d6d12e3bc3c86
1
/*
2
20111227-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 rtl-optimization/51667 */
12
/* Testcase by Uros Bizjak <ubizjak@gmail.com> */
13
14
void
15
bar
(
int
a
)
16
{
17
if
(
a
!= -
1
)
18
ASSERT
(
0
);
19
}
20
21
void
22
foo
(
short
*
a
,
int
t
)
23
{
24
short
r
= *
a
;
25
26
if
(
t
)
27
bar
((
unsigned short
)
r
);
28
else
29
bar
((
signed short
)
r
);
30
}
31
32
short
v
= -
1
;
33
34
void
35
testTortureExecute
(
void
)
36
{
37
foo
(&
v
,
0
);
38
}
39