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
Pick three bugfixes from next branch to trunk for inclusion in 4.5.0 RC2, as discusse...
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
bug-2461.c
blob
80663e767442895952e6c4efd590839fb4f972a9
1
/*
2
bug-2461.c
3
*/
4
5
#include <testfwk.h>
6
7
char
foo
(
const char
*
p
)
8
{
9
return
p
[
0
];
10
}
11
12
int
i
=
0
;
13
14
void
testBug
(
void
)
15
{
16
char
c
[] =
"1234"
;
17
ASSERT
(
foo
(
i
? (
const char
*)
c
:
"test"
) ==
't'
);
18
i
=
1
;
19
ASSERT
(
foo
(
i
? (
const char
*)
c
:
"test"
) ==
'1'
);
20
}
21