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

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 : kb16bitonly kbCompiler
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCVCComp


Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.