---------- Forwarded message ----------
From: feqin fan <feqin1...@gmail.com>
Date: 2013/1/5
Subject: PIC14--static local didnot be assigned the init-value &
encountered NULL pcop
To: sdcc-de...@lists.sourceforge.net


Hello, everyone
maybe I'm submit two bug.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1st: static local didnot be assigned the init-value
the C source code is :
----------------------------------------------------------------------------------
#include "pic16f887.h"

void init_port (int a) {
PORTA = a;
 return;
}

int main () {
static int si = 0x12;  // this init-value will not be assigned to the
variable si.
 init_port(si);
return 0;
}

The ASM file is 1.asm in the attachment.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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...
------------------------------------------------------------------------------------------------------------------------------------------
the ASM file is 2.asm in the in the attachment.

-- 
*live long and prosper..*



-- 
*live long and prosper..*

Attachment: 2.asm
Description: Binary data

Attachment: 1.asm
Description: Binary data

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to