BUG: Fatal Error C1001: (compiler file 'msc3.cpp', line 429)

Last reviewed: August 8, 1997
Article ID: Q149786
The information in this article applies to:
  • The compiler included with: - Microsoft Visual C++ for Windows, versions 1.0, 1.5, 1.51, 1.52

SYMPTOMS

Using the /Oe and /G3 compiler switches when compiling a class whose member functions have a specific relationship to each other results in this error:

   fatal error C1001: internal compiler error
     (compiler file 'msc3.cpp', line 429)

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The /Oe switch refers to Global Register Allocation and the /G3 switch refers to the generation of 80386 code. To use the /G3 switch, on the Options menu, click Project, and then click the Compiler button. Select the Code Generation, and choose 80386 for CPU. To set the /Oe switch, on the Options menu, click Project, and then click the Compiler button. Under the Optimizations category, select customize, and choose Global register allocation.

The specific relationship is as follows:

  • The two member functions must have the following prototypes:

       int Demo::method1(char*,int,int);
       [optional] Demo::method2(char*,int,long);
    
    
  • Demo::method1() must call Demo::method2() passing all three parameters in the same order.
  • Demo::method1() must return its third parameter.

Changing any of these conditions resolves the issue. The problem is not sensitive to memory model.

The following sample code demonstrates the error.

Sample Code

   /* Compile options needed: /G3 /Oe
   */

  class Demo
   {
   public:
        int method1(char*, int, int);
        int method2(char*, int, long);
   };

   int Demo::method1(char* name, int i, int ii)
   {
        method2( name, i, ii);
        return ii;
   }

   int Demo::method2(char* pch, int i, long LL)
   {
        return 0;
   }


Additional query words: 1.52a 1.52b 1.52c
Keywords : CPPIss kb16bitonly
Version : 1.0 1.5 1.51 1.52
Platform : WINDOWS
Issue type : kbbug


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