KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q66169: Internal Compiler Error: ‘@(#)regMD.c:1.100’, Line 3837

Article: Q66169
Product(s): See article
Version(s): 6.00   | 6.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 fixlist6.00a | mspl13_c
Last Modified: 24-OCT-1990

When the code below is compiled from the command line with

   cl filename.c

it will produce the following error:

   fatal error C1001: Internal Compiler Error
   (compiler file '@(#)regMD.c:1.100', line 3837)
   Contact Microsoft Product Support Services

Workaround
----------

To work around the problem, do one of the following:

1. Change the register value to a nonregister value.

2. Put the quantity (x[p] + y[a]) into a temporary variable, then use
   the temporary.

3. Compile with one or more of -Ol, -Oe, or -Og.

4. Use the C version 6.00a update, which corrects this problem.

A code example, which demonstrates this problem, is shown below:

Code Example
------------

#include <stdio.h>

    unsigned y[200];
    unsigned x[320];
    char buffer[0x4000];
    char far *scrn;

void test(p)
int p;
{
   register a;

   buffer[ x[p] + y[a] ] = scrn[ x[p] + y[a] ];

    }

void main(void)
{
   int b;
   test(b);
}

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.