#889 shift by 0 on deref'ed pointer

closed-fixed
5
2013-05-25
2005-03-01
riedel
No

SDCC : pic16 2.4.8 #965 (Mar 1 2005) (UNIX)

unsigned int *x;
#define bar x[0]
#define s 0

void foo()
{
bar=bar>>s;
}

does gives an assertion failure:
Processor: 18f6720
Assertion failed: (aop && aop->aopu.aop_reg[offset] != NULL),
function pic16_popGet, file gen.c, line 2002.
Caught signal 6: SIGABRT

whereas:

unsigned int x;
#define bar x
#define s 0

and

unsigned int *x;
#define bar x[0]
#define s 1

work

Discussion

  • Raphael Neider

    Raphael Neider - 2005-03-02
    • status: open --> closed-fixed
     
  • Raphael Neider

    Raphael Neider - 2005-03-02

    Logged In: YES
    user_id=1115835

    Fixed in #966, probably the front-end should remove
    shift-right by 0 though...

     
  • Raphael Neider

    Raphael Neider - 2005-03-02
    • milestone: --> fixed
    • assigned_to: nobody --> tecodev
     

Log in to post a comment.