ID Number: Q70140
6.00 6.00a 6.00ax | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax fixlist7.00
Summary:
SYMPTOMS
The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the
following internal compiler error when the sample program below is
compiled with any optimization (including default and /Od):
file.c(7) : fatal error C1001: Internal Compiler Error
(compiler file '../optimize.c', line 200)
Contact Microsoft Product Support Services
RESOLUTION
To work around this problem, break the complex expression into
smaller subexpressions using temporary variables. The sample
workaround below illustrates this solution. Another alternative is
to compile with the /qc (quick compile) option.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, and 6.0ax. This problem was corrected in C version 7.0.
More Information:
Sample Code
-----------
/* Compile options needed: none
*/
void main(void)
{
int a;
a = 1 + (a * 2 - 2) * (a * 5 - 5); /* error occurs here */
}
Sample Workaround
-----------------
/* Compile options needed: none
*/
void main(void)
{
int a, temp1, temp2;
temp1 = a * 2 - 2;
temp2 = a * 5 - 5;
a= 1 + temp1 * temp2;
}
Additional reference words: 6.00 6.00a 6.00ax