C1001: Internal Compiler Error: regMD.c:1.117, Line 622

ID Number: Q65643

5.10 | 5.10

MS-DOS | OS/2

buglist5.10 fixlist6.00

Summary:

The sample program shown below will produce the following error when

compiled with Microsoft C version 5.10, with or without optimizations

enabled:

fatal error C1001: Internal Compiler Error

(compiler file '@(#)regMD.c:1.117, line 622)

Contact Microsoft Technical Support

Sample Program

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

#define RBUFSZ 512

#define MAXSAV 32

char buffer[RBUFSZ + MAXSAV];

void main(void)

{

int hold_valid;

unsigned long int val1;

register char *ptr;

val1=ptr-&buffer[MAXSAV-hold_valid];

}

More Information:

The following are three possible workarounds for this problem:

1. Declare ptr as a nonregister character pointer (for example, char

*ptr;).

2. Use a temporary variable to store the index expression above, for

example:

int i;

i=MAXSAV-hold_valid;

val1=ptr-&buffer[i];

3. Upgrade your compiler.

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

problem was corrected in C version 6.00.