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

ID: Q149786

The information in this article applies to:

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:

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          : kb16bitonly kbCompiler kbCPPonly kbVC 
Version           : 1.0 1.5 1.51 1.52
Platform          : WINDOWS
Issue type        : kbbug

Last Reviewed: August 11, 1997