Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#2127 member be assigned a pointer value cause the NULLpcop.

closed-fixed
5
2013-05-25
2013-01-11
feqin fan
No

The C code cause this problem named test_failed.c also at the attchment.
the C source content 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.
//accordingly will cause NULL pcop.
}

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...
------------------------------------------------------------------------------------------------------------------------------------------
command : sdcc -mpic14 -p16f887 test_failed.c
sdcc version : sdcc 3.2.0 #8008 <Jul 6 2012> <MINGW32>
My email : feqin1023@gmail.com

Discussion

  • feqin fan
    feqin fan
    2013-01-11

    the C source cause the problem.

     
    Attachments
  • Raphael Neider
    Raphael Neider
    2013-01-13

    Fixed in r8385.

     
  • Raphael Neider
    Raphael Neider
    2013-01-13

    • assigned_to: nobody --> tecodev
    • status: open --> closed-fixed