C9101000: C1001: regMD.c, Line 725

ID Number: Q68144

6.00a 6.00ax | 6.00a

MS-DOS | OS/2

buglist6.00a buglist6.00ax fixlist7.00

Summary:

SYMPTOMS

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

following internal compiler error when the sample program below is

compiled with global register allocation (/Oe) optimization and

SS!=DS (/Au or /Aw) options:

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

(compiler file '@(#)regMD.c:1.110', line 725)

Contact Microsoft Product Support Services

RESOLUTION

The following workarounds may be used to eliminate this error:

1. Compile without /Oe optimization.

-or-

2. Use the optimize #pragma to turn off /Oe optimization for the

function in which the error is occurring. This is shown in the

sample code below in the commented lines.

-or-

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

STATUS

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

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

More Information:

Sample Code

-----------

/* Compile options needed: /Oe /Alfu

*/

void func1 (struct tag1 *);

void func2 (struct tag3 _near *ptr1, int ptr2 );

struct tag3{

struct tag2 {

int Active_Task_Count, Fd;

struct tag1 {

int i;

} ptr3;

} Task_Vars[3];

};

// #pragma optimize("e", off)

void func3 (struct tag3 _near *ptr1, int ptr2 )

{

struct tag2 _near *Task_Ptr;

Task_Ptr = &ptr1->Task_Vars[ptr2];

func1(&Task_Ptr->ptr3);

if(Task_Ptr->Fd) func2(ptr1, ptr2);

}

// #pragma optimize("e", on)

Additional reference words: 6.00a 6.00ax