C1001: Internal Compiler Error: regMD.c, Line 2013

ID Number: Q70999

6.00a | 6.00a

MS-DOS | OS/2

Summary:

The Microsoft C Compiler version 6.00a produces the following internal

compiler error when the sample program below is compiled using large

(/AL), compact (/AC), or huge (/AH) memory models and global register

allocation (/Oe):

file.c(41) : fatal error C1001: Internal Compiler Error

(compiler file '@(#)regMD.c:1.10', line 2013)

Contact Microsoft Product Support Services

The following workarounds may be used to eliminate this error:

1. Compile without /Oe or disable global register allocation with the

optimize pragma for the function in which the error occurs. The

sample code below illustrates the use of the pragma.

2. Compile with the /qc (quick compile) option.

Microsoft has confirmed this to be a problem in C version 6.00a. This

problem was corrected in C version 7.0.

Sample Code

-----------

/* Compile options needed: /AL /Oe /c

*/

#include <string.h>

void funct0( void );

void funct1( int, int, int );

/* Uncomment the following pragma line and the pragma line at the end

of the code to work around the problem. /*

//#pragma optimize( "e" , off )

void funct0( void )

{

int i, j, k;

char *s = " ";

k = j = i = 0;

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

i += strlen( s );

func1( i, j, k );

func1( i, j, k );

}

//#pragma optimize( "e" , on )