KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q67272: C1001: Internal Compiler Error: codegen.x, Line 559

Article: Q67272
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: 4-DEC-1990

If the sample code below is compiled with the Microsoft C Compiler
version 6.00, using /AL and /Oe, the following internal compiler error
will be generated:

   C1001: Internal Compiler Error
   (compiler file '@(#)codegen.x:1.148', line 559)
   Contact Microsoft Product Support Services

This error will not be generated if the /Oe optimization is used with
/Og and/or /Ol. Microsoft has confirmed this to be a problem in
Microsoft C version 6.00. This problem has been corrected in Microsoft
C version 6.00a.

Sample Code
-----------

#define DB_PTERM_PTR(id)  (db_ptr[id] ? db_ptr[id] : db_swap_in(id))

extern DBRS_PTERM *db_swap_in(int);
extern DBRS_PTERM **db_ptr;

typedef struct
{
   int type;
   int factors[1];
}  DBRS_PTERM;

void foo(int pt_id)
{
   int id;
   int i, j, k;

   j = 0;
   for (i=0;(id=DB_PTERM_PTR(pt_id)->factors[i]) != 0; i++)
   {
      for(k=j;k>=0;--k)
      {}
      DB_PTERM_PTR(pt_id)->factors[j++] = id;
   }
}

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.