ID Number: Q68627
6.00 6.00a 6.00ax | 6.00 6.00a
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 error when the sample program below is
compiled with any optimization:
file.c(10) : fatal error C1001: Internal Compiler Error
(compiler file '@(#)omfMD.c:1.26', line 446)
Contact Microsoft Product Support Services
When the /EM (extended memory) option is also specified with C
version 6.0ax, the following error is generated:
CL1319 Error: Internal error - unrecoverable fault
RESOLUTION
The following are two separate workarounds:
1. Compile with /qc (the quick compile) option.
2. Use the _based keyword to define a location within the code
segment. For example,
int _based(_segname("_CODE")) savess;
void func(void)
{
_asm mov savess, SS
}
STATUS
Microsoft has confirmed this to be a problem in Microsoft C
versions 6.0, 6.0a, and 6.0ax. This problem was corrected in C/C++
version 7.0.
More Information:
The sample program attempts to save data in the code segment using
inline assembly. The design is to store the stack segment immediately
after the jmp instruction. The code should compile without any errors;
however, it is usually not good programming choice to write
self-modifying code.
Sample Code
-----------
/* Compile options needed: none
*/
void func(void)
{
_asm
{
jmp label
nop
nop
nop
label:
mov WORD PTR CS:[$-4], SS
}
}
Additional reference words: 6.00 6.00a 6.00ax