C9104000: C1001: codegen.x, Lines 2022 and 2071

ID Number: Q71661

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax fixlist7.00

Summary:

SYMPTOMS

The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the

following internal compiler errors when the sample program below is

compiled with /Ois:

With C 6.0a

------------

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

(compiler file '@(#)codegen.x:1.174', line 2071)

Contact Microsoft Product Support Services

With C 6.0

-----------

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

(compiler file '@(#)codegen.x:1.148', line 2022)

Contact Microsoft Product Support Services

RESOLUTION

The following are ways to work around the above errors:

1. Do not use the intrinsic version of _lrotr() or _lrotl(). This

can be accomplished by either compiling without /Oi or by using

the function pragma to specify that non-intrinsic code be used

for these functions, as follows:

#pragma function (_lrotr, _lortl)

2. Use the optimize pragma to turn off either /Oi or /Os for the

function where the error occurs. For example, the following line

could be placed before the function:

#pragma optimize( "s", off )

3. Compile without /Os.

STATUS

Microsoft has confirmed this to be a problem in C versions 6.0,

6.0a, and 6.0ax. This problem was corrected in C version 7.0.

More Information:

The following sample code produces the internal compiler errors.

Sample Code

-----------

/* Compile options needed: /Ois

*/

#include <stdlib.h>

long func( int i, long l )

{

return( _lrotr(l, 16) );

}

Additional reference words: 6.00 6.00a 6.00ax