ID Number: Q71001
6.00 6.00a 6.00ax | 6.00 6.00a
MS-DOS | OS/2
buglist6.00 buglist6.00a buglist6.00ax
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 loop optimization (/Ol):
file.c(9) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)grammar.c:1.138', line 164)
Contact Microsoft Product Support Services
RESOLUTION
The following workarounds may be used to eliminate this error:
1. Compile without /Ol or disable loop optimization with the
optimize pragma for the function in which the error occurs.
-or-
2. Compile with the /qc (quick compile) option.
-or-
3. Rewrite the ternary operator expressions as if-then constructs.
STATUS
Microsoft has confirmed this to be a problem in C versions 6.0,
6.0a, and 6.0ax. We are researching this problem and will post new
information here as it becomes available.
More Information:
Sample Code
-----------
/* Compile options needed: /Ol
*/
#include <stdio.h>
void main(void) {
double t=0;
int j;
for(j=0;j<2;j++) {
t += t ? 0.0 : 1.0;
t += t ? 0.0 : 1.0;
}
}