 |
|
 |
MESC TOOL NEWS:
MESCT-CC32R-971216D
Please care about the problem described bellow that occurs in using C compiler cc32R in cross tool kit CC32R for the M32R family.
Versions Concerned
This problem occurs in the following versions (all the versions affected).
To know the version number, give cc32R the "-V" option.
- CC32R V.1.00 Release 1
- CC32R V.1.00 Release 2
- CC32R V.1.00 Release 3
Problem
- Description of Problem
When all of the conditions (1) through (6) in "Occurrence Conditions" described below are satisfied, an internal error occurs at optimization.
- In CC32R V.1.00 Release 1 or Release 2
"cg32R:internal error:unreachable logic at "Flow0pt.c":1604"
- In CC32R V.1.00 Release 3
"cg32R:internal error:unreachable logic at "Flow0pt.c":1605"
- Occurrence Conditions
- The options of optimized level 6 or more (-06, -07, -0, -0time only, or -0space only) are given at compiling.
- Functions come with arguments.
- "if (expression 1) { statement 1} else { statement 2}" is described.
- "if (expression 2) { statement 3}" is included in statement 1.
- Statement 2 and statement 3 are constructed only by assignment statement to an argument.
- Succeeding to the if-else statement in (3) is only assignment statement to an argument.
---------------------------------------------------------------
foo(A) /* condition (2) */
{
if(B) { /* condition (3) */
if(C) { /* condition (4) */
substitution in argument /* condition (5) */
}
} else { /* condition (3) */
substitution in argument /* condition (5) */
}
substitution in argument /* condition (6) */
}
---------------------------------------------------------------
- Example of Description
---------------------------------------------------------------
extern char n;
void foo( int Ans ) /* condition (2) Argument is included. */
{
if( n != 0) { /* condition (3) "if-else statement" is described. */
if( n > 0 ) { /* condition (4) "if-else statement" is again described.*/
/* workaround Error does not occur if another
expression is described before
assignment statement to an argument. */
Ans = 0; /* condition (5) Arbitrary value is substituted
in argument. */
/* workaround Error does not occur if another
expression is described after
assignment statement to an argument. */
}
} else { /* condition (3) if-else statement is described. */
/* workaround Error does not occur if "else" is removed.*/
/* workaround Error does not occur if another expression
is described before assignment statement
to an argument. */
Ans = 0; /* condition (5) Arbitrary value is substituted
in argument. */
/* workaround Error does not occur if another expression
is described after assignment statement
to an argument. */
}
/* workaround Error does not occur if another expression
is described before assignment statement
to an argument.*/
Ans = 0; /* condition (6) Arbitrary value is substituted in argument.*/
/* workaround Error does not occur if another expression
is described after assignment statement
to an argument.*/
}
---------------------------------------------------------------
- Workaround
Please work around the error by using any one of the ways explained bellow.
- Gives the options of optimized level 0-5 (-00, -01, -02, -03, 04, 05) at compiling.
- Reverses the order of statement 1 and statement 2 in (3) of "Occurrence Conditions" not to make a decision on statement 1.
- Adds other statements than those substituted in arguments to statements in (5) or (6) of "Occurrence Conditions" (for example, a statement calling other functions, a statement substituted in multi-variables etc.).
|
 |