Absolute memory overlap detection by SDCC

BLRCalvin
2008-04-28
2013-03-12
  • BLRCalvin
    BLRCalvin
    2008-04-28

    Hello,

    I am using SDCC 2.8.0 #5117 (Mar 23 2008) for MCS51 port.

    In the usermanual under sec 3.5, Absolute addressing, it is mentioned that the linker will detect the overlaps if variables are provided with initializers. I expect the linker to throw an error for the following piece of code but it is not giving any error.

    volatile __code __at (0x2000) char dummy = 'a';

    volatile __code __at (0x2000) char dummy1 = 'b';

    int main()
    {

    if( dummy == dummy1 ) return 1;

    return 0;

    }

    compiler options: sdcc -mmcs51 example.c

    Please help me in this regard.

    Regards,
    Raghu.

     
    • Maarten Brock
      Maarten Brock
      2008-04-28

      I'd say you found a bug.