The following code fragment does not compile for the pic16 port, although it is perfectly legal and potentially useful:
<code name="init-ptr-struct.c">
struct foo {
int a;
};
struct foo f={1};
struct foo *g=&f; // This line fails!
</code>
sdcc 2.7.0, r4810 fails with
$ sdcc -mpic16 -p18f1220 init-ptr-struct.c
at 5: error 129: pointer types incompatible
Problem is probably in glue.c. Please compare with SDCCglue.c.
I just verified that this problem still exists in 2.9.7 #5983.
Philipp