C9012000: C1001: regMD.c, Lines 3047 and 3020

ID Number: Q67779

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 /Og and /Oe for compact (/AC) or large (/AL) memory

model:

With C 6.0

----------

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

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

Contact Microsoft Product Support Services

With C 6.0a and 6.0ax

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

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

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

Contact Microsoft Product Support Services

RESOLUTION

The following are valid workarounds for this problem:

1. Compile without the /Oe or /Og optimizations.

-or-

2. Use the optimize pragma in the code to turn off the offending

optimizations for the particular function.

-or-

3. Compile for small (/AS) or medium (/AM) memory model.

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/C++ version 7.0.

More Information:

Sample Code

-----------

/* Compile options needed: /Oeg /AL

*/

#include <string.h>

void func1 (void)

{

char *o, *wp, *cp;

int c,t;

for (;;)

{

wp++;

t = wp - cp;

if Ó t=0;

if (t) strncpy (&o[c], cp, t );

c = t;

cp = wp;

}

}