Known Issues - Epson S5U1C17001C Manual

Cmos 16-bit single chip microcomputer, c compiler package for s1c17 family
Hide thumbs Also See for S5U1C17001C:
Table of Contents

Advertisement

6 C COMPilEr

6.7 known issues

The following shows the case of bugs recognized in GNU17 C Compiler.
content of bug
The following compile error occurs, when declaring a huge array( several hundred thousand bytes ).
cc1.exe: out of memory allocating mmmmmmmm bytes after a total of nnnnnnnn bytes
correspondence method
Be small the memory domain which a compiler secures at once by dividing the array and the source code.
reappearance code
unsigned char uc_array[] = { 0x00,0x01, ........ };
No.1
int main()
{
※ The size of array is more than several hundred thousand bytes.
cause
This is the error that the memory domain which the compiler has secured becomes insufficient at the time of
compile.
Because the size of the array without dimension is too large.
The same error may occur when compiling the source file with many lines.
content of bug
The result does not become the right value. Because sign extension of char type variable and addition /
subtraction are carried out at once by optimization.
This bug occurs when all the following conditions are filled.
・ First the value which is more than 128( =0x80 ) is set to the variable which is bigger than char type.
Second substitute the result which addition / subtraction are carried out to this variable for char
type variable.
Last substitute the result which addition / subtraction are carried out to this char type variable
for the variable which is bigger than char type.
Then the error occurs.
・ It is necessary that the result of one of substitution is within 0 - 127.
correspondence method
Declare volatile to char type variable in order not to sign extension and addition / subtraction are carried out
at once by optimization.
No.2
reappearance code
signed int big_type_val ;
int main( void )
{
signed char char_val ;
big_type_val = 128 ;
char_val = big_type_val - 1 ; ・・・(1)
big_type_val = char_val - 1 ; ・・・(2)
cause
It is an error by optimization.
The process of (1) & (2) is collected into one and compiled by optimization.
For this reason, sign extension and operation are carried out at once.
Then the result does not become the right value.
6-16
// big_type_val should be 126, but is -130.
EPSOn
(C COMPilEr PaCkagE fOr S1C17 faMily) (Ver. 1.5.0)
S5U1C17001C ManUal

Advertisement

Table of Contents
loading

Table of Contents