FIX: Internal Compiler Error C1001: REG86.C, Line 3154

Last reviewed: September 18, 1997
Article ID: Q115142
1.00 WINDOWS kbtool kbfixlist kbbuglist

The information in this article applies to:

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

        - Microsoft Visual C++ for Windows, version 1.0
    

SYMPTOMS

Compiling the source code shown at the end of this article generates the following internal compiler error:

    fatal error C1001: internal compiler error
       (compiler file '@(#)reg86.c:1.26', line 3154)

RESOLUTION

One of the following methods may be used to resolve the internal compiler error:

  • Compile without the /Ot option.

    -or-

  • Compile with the fast compiler option, /f.

    -or-

  • Use #pragma optimize to disable optimizations.

    -or-

  • Use temporary variables to store the results of the mathematical expressions. These temporary variables are then used as array subscripts.

STATUS

Microsoft has confirmed this to be a problem with the Microsoft products listed above. The problem was corrected in Visual C++ for Windows, version 1.5.

MORE INFORMATION

The following sample code can be used to demonstrate this problem:

Sample Code

   /* Compile options needed: /Ot /c (/DFIX to use workaround)
   */

   extern char m[];

   //#pragma optimize("",off)

   int func(char *vector, long value)
   {
       long idx = value;

   #ifdef FIX
       char temp1, temp2;

       temp1 = idx >> 3;
       temp2 = m[idx&7];

       vector[temp1] |= temp2;
   #else
       vector[idx >> 3] |= m[idx&7];
   #endif
   }
   //#pragma optimize("",on)


Additional reference words: 1.00 8.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: CLIss
Keywords : CLIss kb16bitonly kbbuglist kbfixlist kbtool
Version : 1.00
Platform : WINDOWS
Solution Type : kbfix


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: September 18, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.