C9112007: C1001: newcse.c, Line 381

ID Number: Q79863

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax

Summary:

PROBLEM ID: C9112007

SYMPTOMS

Microsoft C versions 6.0, 6.0a, and 6.0ax generate an internal

compiler error when the following sample code is compiled with loop

(/Ol) and time (/Ot) optimizations.

The following error will be generated if C 6.0ax is used (/EM needs

to be specified):

CL1319 Error: Internal error - unrecoverable fault

Under MS-DOS, C 6.0a will hang in small (/AS) and medium (/AM)

memory models. In compact (/AC), large (/AL), and huge (/AH) memory

models, the following error is produced:

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

(compiler file '@(#)newcse.c:1.93', line 381)

Contact Microsoft Product Support Services

Under MS-DOS, C 6.0 will hang in small and medium memory models. In

compact, large, and huge memory models, the following error is

generated:

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

(compiler file '@(#)newcse.c:1.92', line 381)

Contact Microsoft Product Support Services

Under OS/2, C 6.0 and 6.0a issue the following error:

Command line error D2030 : INTERNAL COMPILER ERROR in 'P2'

Contact Microsoft Product Support Services

RESOLUTION

To avoid this problem, do one of the following:

1. Disable either loop or time optimization by not specifying /Ol

or /Ot on the command line or by using a pragma to control the

optimization for specific blocks of code. The following is an

example of using the loop_opt pragma to disable loop

optimizations where the compiler error is occurring:

#pragma loop_opt ( off )

{

/* code */

}

#pragma loop_opt ( )

Optionally, the #pragma optimize("l", off) could be used. The

loop_opt pragma was included to maintain compatibility with C

5.1 code, when the optimize pragma did not exist.

-or-

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

STATUS

Microsoft has confirmed this to be a problem in Microsoft C

versions 6.0, 6.0a, and 6.0ax. We are researching this problem and

will post new information here as it becomes available.

More Information:

Sample Code

-----------

/* Compile options needed: /AL /Ol (/Ot is default)

*/

#include <time.h>

char var1;

double var2;

long var3;

int main( void );

int main( )

{

int value;

register int I;

register int J;

var1 = 0;

for ( I=0; I < 32000; I++ )

{

for( J=0; J < 32000; J++ )

{

var1++;

}

}

time( &var3 );

var2 = 0;

for ( I=0; I < 32000; I++ )

{

for( J=0; J < 32000; J++ )

{

var2++;

}

}

time( &var3 );

value = 0;

return value;

}

Additional reference words: 6.00 6.00a 6.00ax lock