C9008000: C1001: omf.c, Line 147 or D2030 Error

ID Number: Q65314

6.00 6.00a 6.00ax | 6.00 6.00ax

MS-DOS | OS/2

buglist6.00 buglist6.00a buglist6.00ax fixlist7.00

Summary:

SYMPTOMS

The Microsoft C Compiler versions 6.0, 6.0a, and 6.0ax produce the

following internal compiler errors when the sample program below is

compiled with default optimizations:

Under DOS

---------

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

(compiler file '@(#)omf.c:1.88', line 147)

Contact Microsoft Product Support Services

Under OS/2

----------

Command line error D2030 : INTERNAL COMPILER ERROR in 'P2'

Contact Microsoft Product Support Services

Note: Compiling the code with C version 6.0ax with the /EM option to

utilize extended memory does not result in an internal compiler

error, but the code generated is incorrect.

RESOLUTION

One of the following methods may be used to work around these errors:

1. Compile with the /qc (quick compile) option.

- or -

2. Rearrange the code. In the example below, the error is eliminated

by switching the order of the last two lines.

STATUS

Microsoft has confirmed this to be a problem in C versions 6.0, 6.0a,

and 6.0ax. This problem was corrected in C/C++ version 7.0.

More Information:

Sample Code

-----------

/* Compile options needed: /c

*/

_segment myseg;

extern int _based(myseg) a[];

int _based(_segname("aseg")) a[] = {{0}};