FIX: Nested Loops Cause Internal Compiler Error in msc1.cppLast reviewed: September 18, 1997Article ID: Q115537 |
1.00
WINDOWS
kbtool kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSCompiling code that contains deeply nested loops, as demonstrated in the sample source code in the "MORE INFORMATION" section below (which contains 16 nested loops), produces the following internal compiler error, regardless of the command-line optimizations used:
fatal error C1001: internal compiler error (compiler file 'msc1.cpp', line 581) RESOLUTIONIf possible, change the source code to reduce the number of nested loops.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed above. This problem was corrected in Visual C++ version 1.5.
MORE INFORMATIONWith the Microsoft C compiler, version 6.0, the sample code below causes a C1026 "parser stack overflow, program too complex" error to be generated. No errors or warnings are generated with the C/C++ compiler, version 7.0. The C1001 error is generated with C/C++, version 8.0.
Sample Code
/* Compile options needed: none */ void main(void) { int i = 0; for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) for(;i<2;) i = 2; /* error occurs on this line */ } |
Additional reference words: 8.00 1.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |