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
/
bug-2982135.c
blob
613d9fa9815079e02ec5f450b7adebbbd99ec4d8
1
/*
2
bug 2982135
3
*/
4
5
#include <testfwk.h>
6
7
#ifndef PORT_HOST
8
#pragma disable_warning 85
//in function f2 unreferenced function argument : 'n'
9
#endif
10
11
char
*
fp
;
12
13
char
*
f1
(
int
n
){
14
char
*
tmp
=
fp
;
15
fp
+=
n
;
16
return
tmp
;
17
}
18
19
char
*
f2
(
int
n
){
20
char
*
tmp
=
fp
;
21
fp
+=
3
;
22
return
tmp
;
23
}
24
25
void
test2982135
(
void
)
26
{
27
fp
= (
char
__xdata
*)
42
;
28
ASSERT
(
f1
(
23
) == (
char
__xdata
*)
42
);
29
fp
= (
char
__xdata
*)
42
;
30
ASSERT
(
f2
(
23
) == (
char
__xdata
*)
42
);
31
}
32