C1001: Internal Compiler Error: regMD.c, Line 4634

ID Number: Q62072

6.00 | 6.00

MS-DOS | OS/2

buglist6.00 fixlist6.00a

Summary:

The Microsoft C Compiler version 6.0 produces the following internal

compiler error when the sample program below is compiled for compact

(/AC) or large (/AL) memory model with default optimization:

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

(compiler file '@(#)regMD.c:1.100', line 4634)

Contact Microsoft Product Support Services

Microsoft has confirmed this to be a problem in C version 6.0. This

problem was corrected in C version 6.0a.

The following workarounds may be used to eliminate the above error in

C version 6.0:

1. Enable global register allocation (/Oe).

-or-

2. Disable all optimization (/Od).

-or-

3. Disable optimizations locally with the optimize pragma.

-or-

4. Simplify the function call through the use of temporary variables.

Sample Code

-----------

/* Compile options needed: /AL

*/

#include<stdio.h>

typedef struct window

{

int *fld;

int f_cursor, l_cursor;

} WINDOW;

void test(int,int);

void func(WINDOW *w)

{

test(w->fld[w->f_cursor],w->fld[w->f_cursor+1]-w->fld[w->f_cursor]);

}