BUG: Internal Compiler Error, C1001, MSC2.CPP, line 1011

Last reviewed: July 22, 1997
Article ID: Q114532
1.50 1.51 1.52 WINDOWS kbtool kbbuglist

The information in this article applies to:

  • The Microsoft C/C++ Compiler (CL.EXE), included with:

        - Microsoft Visual C++ for Windows, version 1.5, 1.51, and 1.52
    

SYMPTOMS

When using the /Ol switch (enable loop optimizations) and compiling a module that contains several large loops, or that contains several layers of nested loops, version 8.0c of the Microsoft C/C++ compiler may generate the following error message:

   file.c(xxx) : fatal error C1001: internal compiler error
               (compiler file 'msc2.cpp', line 1011)

RESOLUTION

There are two workarounds for this error message:

  1. Compile using the fast compiler. Use of the fast compiler can be forced by using the /f compiler switch.

    -or-

  2. Do not compile with loop optimizations enabled. This can be done either at the module level by removing the /Ol option from the compiler command line, or at the function level by using #pragma optimize directives. The syntax of the #pragma optimize directive is as follows:

           #pragma optimize( "l", off ) // Disable loop optimizations
    

           // Function that contains the code causing the problem.
           // This can be determined by the line number given in the
           // C1001 error message.
    

           #pragma optimize( "l", on ) // Enable loop optimizations
    

STATUS

Microsoft has confirmed this to be a problem with the C/C++ compiler version 8.0c. We are researching the problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 1.50 8.00c
KBCategory: kbtool kbbuglist
KBSubcategory: CLIss
Keywords : kb16bitonly


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.