Download Operating Precautions Embedded Workbench for 78K

Transcript
Operating Precautions for IAR EW78K
N) Description of Operating Precautions for the C/C++ Compiler ICC78K0R
No. G36
Internal Compiler Error due to non terminated Jump Size Optimization
Details
At optimization level high or medium some complex switch statements cause an internal
compiler, because the jump size optimization will not terminate:
Workaround:
Reduce the optimization level to low or the function including the switch statement by using
#pragma optimization in front of the function definition.
The issue will be fixed in the next update (target May 2011)
No. G37
Internal Compiler Error at using intrinsic function ‘__segment_begin’
Details
At optimization level medium or higher using the intrinsic function ‘__segment _begin’ inside an
if-statement or any kind of loop may cause an internal compiler error.
Example:
#include <intrinsics.h>
#pragma segment="MYSEG"
extern void func1(unsigned char*);
void test (void* ptr)
{
if( ptr != ((void*)0) ) {
func1(__segment_begin("MYSEG"));
}
}
Workarounds:
1)
Reduce the optimization level to low for the function including the if statement by using #pragma
optimization in front of the function definition:
#pragma optimize=low
void test (void* ptr)
{
…
}
2)
Put the intrinsic function call in a function which is not inlined.
The issue will be fixed in the next update (target May 2011)
Customer Notification R20UT0002ED0737
59