Hi.
I'm tracing  the NULL pcop. I am a single boy, so have a lot time to do this.
Any new discovery,I will tell you.
:-)

Best Regards.

2013/1/10 Raphael Neider <rneider@web.de>
Hi,

> 1st: static local didnot be assigned the init-value

If I remember correctly, globals and static variables are not
initialized by the PIC port -- there is simply no .asm directive
generated for initializing them. I do not remember why this was the
case (I think there was some nasty bug that made it not work reliably
anyways so the code has been removed, but that has been a loooong time
ago). The proposed workaround at that time was to initialize globals
"manually" at the start of main. For static variables, I have no
suggestion besides turning them into name-mangled globals by hand.

Any volunteers to fix this? I'll try to also look into this by the
weekend (or maybe the next one ;-) )

> 2nd: encountered NULL pcop
>
> the C source code is :
> -------------------------------------------------------------------------------------------------------
> struct s {
>     int a;
>     struct s *next;
> };
>
> void main()
> {
>     struct s d,e;
>
>     d.a=0x1111;
>     e.a=0x4444;
>     d.next=&e; //this line will cause the wrong,will cause beyond the
> boundary and assign.
> }
>
> And the the message in the shell is:
> ----------------------------------------------------------------------------------------------------------------------------------------
> popGet: (offset[3] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> popGet: (offset[4] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> popGet: (offset[5] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> popGet: (offset[6] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> popGet: (offset[7] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> popGet: (offset[8] > AOP_SIZE(op)[3]-1) && AOP_TYPE(op) != AOP_LIT)
> WARNING: encountered NULL pcop--this is probably a compiler bug...

I'll have to look into this more closely, hopefully this weekend.
Clearly this is a bug -- thanks for the report. You might want to turn
this into a proper bug report using the sourceforge's bug tracker
system for the sdcc project to make sure the report will not be washed
away by later eMails.

Best regards
Raphael

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
sdcc-devel mailing list
sdcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-devel



--
live long and prosper..