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-pr49281.c
blob
bdd3fec4666d00f28ab2b828f267bd66c793ef37
1
/*
2
pr49281.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 target/49281 */
12
13
extern
void
abort
(
void
);
14
15
int
16
foo
(
int
x
)
17
{
18
return
(
x
<<
2
) |
4
;
19
}
20
21
int
22
bar
(
int
x
)
23
{
24
return
(
x
<<
2
) |
3
;
25
}
26
27
void
28
testTortureExecute
(
void
)
29
{
30
if
(
foo
(
43
) !=
172
||
foo
(
1
) !=
4
||
foo
(
2
) !=
12
)
31
ASSERT
(
0
);
32
if
(
bar
(
43
) !=
175
||
bar
(
1
) !=
7
||
bar
(
2
) !=
11
)
33
ASSERT
(
0
);
34
return
;
35
}
36