Skip to main content
seawwh
Associate II
February 9, 2009
Question

Is it a bug in IAR 4.42a for Cortex-M3?

  • February 9, 2009
  • 2 replies
  • 709 views
Posted on February 09, 2009 at 02:14

Is it a bug in IAR 4.42a for Cortex-M3?

    This topic has been closed for replies.

    2 replies

    seawwh
    seawwhAuthor
    Associate II
    May 17, 2011
    Posted on May 17, 2011 at 13:02

    /******************************************************

    1. IAR 4.42A, MCU: ST STM32F10xxE

    2. Optimization =None Or Lowï¼›

    ******************************************************/

    typedef unsigned char u8;

    typedef unsigned long u32;

    u8 BugTest(void);

    u8 BugTest(void) {

    u32 CC;

    u8 AA,BB=0;

    CC = 0x12345678;

    AA = CC >> 8;

    BB |= (AA & 0x80) >> 7;

    return BB; // Error: BB=0x68, should be 0x00

    }

    /******************************************************/

    static u8 TT;

    int main() {

    u8 WW;

    TT=BugTest();

    WW=TT;

    }

    are there any patch(4.42a) for it ?

    by the way , Test IAR 5.20 is OK.

    venus
    Associate
    May 17, 2011
    Posted on May 17, 2011 at 13:02

    I've known who you are,hiahia

    你�是在21IC�表过了么,都跑到这里啦?娃哈哈