C9012000: C1001: regMD.c, Line 1017

ID Number: Q67778

6.00a 6.00ax | 6.00a

MS-DOS | OS/2

buglist6.00a buglist6.00ax fixlist7.00

Summary:

SYMPTOMS

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

following internal compiler error when the sample program below is

compiled with /Oe optimization under the compact (/AC) or large

(/AL) memory models:

fatal error c1001: Internal Compiler Error

(compiler file '@(#)regMD.c:1.110',line 1017)

Contact Microsoft Product Support Services

RESOLUTION

The following are valid workarounds for the problem:

1. Compile without the /Oe optimization.

-or-

2. Use the #pragma optimize switch in the code to turn off the

offending optimizations for the particular function.

-or-

3. Compile under the small (/AS) or medium (/AM) memory models.

STATUS

Microsoft has confirmed this to be a problem in Microsoft C

versions 6.0a and 6.0ax. This problem was corrected in C/C++ version

7.0.

More Information:

Sample Code

-----------

/* Compile Line: /AL /Oe

*/

char hex_digits[]={"f"};

int x(char *resultp, int item)

{

char *s;

int hundreds;

s=resultp;

hundreds=100;

if(hundreds)

*s++='0';

*s++=' ';

*s++=hex_digits[item/16];

*s++=hex_digits[item%16];

}