cancel
Showing results for 
Search instead for 
Did you mean: 

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

seawwh
Associate II
Posted on February 09, 2009 at 02:14

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

2 REPLIES 2
seawwh
Associate II
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 II
Posted on May 17, 2011 at 13:02

I've known who you are,hiahia

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