blob: 07f4eea194a92c71f12d24aa7e291fc7f803bb27 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/* bug1477149.c
multiple definition of local symbol both normal and debug
second module is fwk/lib/statics.c
type: long, float
*/
#include <testfwk.h>
#if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
static {type} {type}_1 = 2;
static {type} s_get_{type}_1(void)
{
{type} alfa = {type}_1;
{type} beta = {type}_1 + alfa;
{type} gamma = {type}_1 + beta;
return alfa + beta + gamma;
}
/* bug 3038028 */
static char s_get_indexed(char index, char *msg)
{
/* "float" will put _s_get_indexed_PARM_2 in DSEG,
* "long" will put _s_get_indexed_PARM_2 in OSEG
*/
{type} idx = index;
return msg[(char)(idx+1)];
}
{type} get_{type}_1(void);
char get_indexed(char index, char *msg);
#endif
void testBug(void)
{
#if !defined( __SDCC_pdk14) && !defined(__SDCC_pdk15) // Lack of memory
ASSERT (s_get_{type}_1() == 12);
ASSERT (get_{type}_1() == 6);
ASSERT (s_get_indexed(1, "One") == 'e');
ASSERT (get_indexed(1, "One") == 'n');
#endif
}
|