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-20100827-1.c
blob
d531031991b9d29cabd7056d86b7980640c7e2ba
1
/*
2
20100827-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
foo
(
char
*
p
)
13
{
14
int
h
=
0
;
15
do
16
{
17
if
(*
p
==
'\0'
)
18
break
;
19
++
h
;
20
if
(
p
==
0
)
21
ASSERT
(
0
);
22
++
p
;
23
}
24
while
(
1
);
25
return
h
;
26
}
27
28
void
29
testTortureExecute
(
void
)
30
{
31
if
(
foo
(
"a"
) !=
1
)
32
ASSERT
(
0
);
33
return
;
34
}
35