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-pr71631.c
blob
e75b550b3397e38cc9046ec2e092618a246471c8
1
/*
2
pr71631.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 tree-optimization/71631 */
12
13
volatile
char
v
;
14
int
a
=
1
,
b
=
1
,
c
=
1
;
15
16
void
17
foo
(
const char
*
s
)
18
{
19
while
(*
s
++)
20
v
= *
s
;
21
}
22
23
void
24
testTortureExecute
(
void
)
25
{
26
volatile
int
d
=
1
;
27
volatile
int
e
=
1
;
28
int
f
=
1
/
a
;
29
int
g
=
1U
<
f
;
30
int
h
=
2
+
g
;
31
int
i
=
3
%
h
;
32
int
j
=
e
&&
b
;
33
int
k
=
1
==
c
;
34
int
l
=
d
!=
0
;
35
short
m
= (
short
) (-
1
*
i
*
l
);
36
short
x
=
j
* (
k
*
m
);
37
if
(
i
==
1
)
38
foo
(
"AB"
);
39
if
(
x
!= -
1
)
40
ASSERT
(
0
);
41
return
;
42
}