1. Product and Versions Concerned
The C compiler package--M3T-NC30WA--for the M16C series*
V.1.00 Release 1 through V.5.44 Release 00
*M16C is the generic name of the M16C/60, /30, /20, /10, /Tiny,
and R8C/Tiny series.
2. Description
If compile option -OSFA (-Ostack_frame_align) is used, incorrect values
of stack size may be provided in inspector information and the stack
size display file (with extension .stk). As a result, the values of
stack size calculated by the STKViewer and CallWalker (utilizing
inspector information) and the stk30 stack size calculate utility
(utilizing the stack size display file) will be false.
3. Conditions
This problem occurs if the following conditions are all satisfied:
(1) Compile option -OSFA (-Ostack_frame_align) is selected.
(2) Compile option -genter is not selected.
(3) In the program exists a function that does not make any stack frame.
In order that no function can make the stack frame, the following
three conditions must be met:
- The function does not take arguments passed via the stack.
- In the function exist no dynamic variables (except register-
assigned ones) or dynamic variables have been deleted at
optimizing the compiler.
- The compiler does not create any temporary variables.
Example
------------------------------------------------------------
void sub(unsigned int);
void func(void) /* Condition (3) */
{
sub(10);
}
------------------------------------------------------------
4. Workaround
Deselect compile option -OSFA (-Ostack_frame_align), or use -genter
along with -OSFA.
5. Schedule of Fixing the Problem
We plan to fix this problem in the next release V.5.45 Release 00 of the product.