C1001: Internal Compiler Error: code.c, Line 439

ID Number: Q27954

5.00 5.10 | 5.10

MS-DOS | OS/2

buglist5.00 buglist5.10 fixlist6.00

Summary:

The C versions 5.00 and 5.10 compilers produce the following internal

compiler error when the sample program below is compiled with loop

optimization (/Ol):

fatal error C1001: Internal Compiler Error

(compiler file '@(#)code.c:1.43', line 439

Contact Microsoft Technical Support

The problem seems to be related to nested for loops, and occurs in all

memory models. Turning off loop optimization eliminates the error.

Microsoft has confirmed this to be a problem in C versions 5.00 and

5.10. This problem was corrected in C version 6.00.

Sample Code

-----------

crosshar (whc)

long whc;

{

unsigned int ax, cy, offset;

unsigned char far *byte;

int xh[13][15];

for (cy = 0; cy <= 12; ++cy)

{

for (ax = 0; ax <= 14; ++ax)

{

if (xh[cy][ax])

{

byte = (unsigned char far *) (0xB0000000) + offset;

}

}

}

}

More Information:

Workarounds to this problem are:

1. Do not use the loop optimization on this set of loops (which can be

achieved using the loop_opt pragma).

-or-

2. Change the innermost statement from the following

{

byte = (unsigned char far *) (0xB0000000) + offset;

}

to the following:

{

byte = (unsigned char far *) (0xB0000000);

byte += offset;

}