2 * [ 2655200 ] pointer to pdata memory not correctly initialized
4 * test_array[..] = &thing_pdata
7 * SDCCclue.c(initPointer)
8 * ... SPEC_SCLS (expr->left->etype) == S_PDATA)
16 #if defined (__SDCC_mcs51) || defined (__SDCC_ds390)
17 __code
char thing_code
= 0;
18 __data
char thing_data
;
19 __idata
char thing_idata
;
20 __xdata
char thing_xdata
;
21 __pdata
char thing_pdata
;
22 __pdata
char thing_apdata
[2];
26 const char * __code test_array
[] = {
28 #if defined (__SDCC_mcs51) || defined (__SDCC_ds390)
30 , &thing_data
, &thing_idata
, &thing_xdata
, &thing_pdata
31 , thing_apdata
, (char *)thing_apdata
36 const char *gime_thing() { return &thing
; }
37 #if defined (__SDCC_mcs51) || defined (__SDCC_ds390)
38 const char *gime_thing_code() { return &thing_code
; }
39 const char *gime_thing_data() { return &thing_data
; }
40 const char *gime_thing_idata() { return &thing_idata
; }
41 const char *gime_thing_xdata() { return &thing_xdata
; }
42 const char *gime_thing_pdata() { return &thing_pdata
; }
43 const char *gime_thing_apdata() { return thing_apdata
; }
50 ASSERT(test_array
[0] == gime_thing());
52 #if defined (__SDCC_mcs51) || defined (__SDCC_ds390)
53 ASSERT(test_array
[1] == gime_thing_code());
54 ASSERT(test_array
[2] == gime_thing_data());
55 ASSERT(test_array
[3] == gime_thing_idata());
56 ASSERT(test_array
[4] == gime_thing_xdata());
57 ASSERT(test_array
[5] == gime_thing_pdata());
58 ASSERT(test_array
[6] == gime_thing_apdata());
59 ASSERT(test_array
[7] == gime_thing_apdata());