C9011000: C1001: regMD.c, Line 725

ID Number: Q67031

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 errors when the sample program below is

compiled with any of these optimizations:

/Oa /Oc /Oi /On /Op /Or /Os /Ot /Ow /Oz

With C 6.0

----------

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

(compiler file '@(#)regMD.c:1.100', line 3074)

Contact Microsoft Product Support Services

With C 6.0a and 6.0ax

---------------------

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

(compiler file '@(#)regMD.c:1.100', line 3101)

Contact Microsoft Product Support Services

RESOLUTION

The following are possible workarounds for these errors:

- Add one of the following optimizations:

/Od /Oe /Og /Ol /Ox

- Do not declare the structure variables of type register.

- Use an if-else construct instead of the ternary expression.

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: /Oa

*/

void main(void)

{

struct s1 {

int i;

};

int n;

register struct s1 *ptr1, *ptr2;

ptr1 = ptr2;

n = ptr1->i ? ptr1->i : 10000;

}

Additional reference words: 6.00 6.00a 6.00ax