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-pr44202-1.c
blob
31fa21072130d74741f58e0f5075eca8af939bb0
1
/*
2
pr44202-1.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
int
12
add512
(
int
a
,
int
*
b
)
13
{
14
int
c
=
a
+
512
;
15
if
(
c
!=
0
)
16
*
b
=
a
;
17
return
c
;
18
}
19
20
int
21
add513
(
int
a
,
int
*
b
)
22
{
23
int
c
=
a
+
513
;
24
if
(
c
==
0
)
25
*
b
=
a
;
26
return
c
;
27
}
28
29
void
30
testTortureExecute
(
void
)
31
{
32
int
b0
= -
1
;
33
int
b1
= -
1
;
34
if
(
add512
(-
512
, &
b0
) !=
0
||
b0
!= -
1
||
add513
(-
513
, &
b1
) !=
0
||
b1
!= -
513
)
35
ASSERT
(
0
);
36
return
;
37
}
38