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-20050131-1.c
blob
9368b2fb93a8dd7de47c2a843a0d201f70677c67
1
/*
2
20050131-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
/* Verify that we do not lose side effects on a MOD expression. */
12
13
#include <stdlib.h>
14
#include <stdio.h>
15
16
int
17
foo
(
int
a
)
18
{
19
int
x
=
0
%
a
++;
20
return
a
;
21
}
22
23
void
24
testTortureExecute
(
void
)
25
{
26
if
(
foo
(
9
) !=
10
)
27
ASSERT
(
0
);
28
return
;
29
}