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
/
bug2077267.c
blob
59e4d59c0360d2825aa64cc620ba5e2f6bbc7d36
1
/*
2
bug 2077267
3
*/
4
5
#include <testfwk.h>
6
7
#ifndef __SDCC
8
#define __critical
9
#endif
10
#if defined(__SDCC_pdk14) || defined(__SDCC_pdk15)
11
#define __critical
// __critical not implemented for pdk14
12
#endif
13
14
void
bug
(
char
*
x
)
15
{
16
*
x
= *
x
+
1
;
17
}
18
19
void
20
testBug
(
void
)
21
{
22
char
x
=
1
;
23
24
bug
(&
x
);
25
26
__critical
{
27
bug
(&
x
);
28
}
29
30
ASSERT
(
x
==
3
);
31
}