ID Number: Q62310
6.00 | 6.00
MS-DOS | OS/2
buglist6.00 fixlist6.00a
Summary:
SYMPTOMS
The Microsoft C Compiler version 6.0 produces the following
internal compiler error when the sample program below is compiled
for compact (/AC) or large (/AL) memory model with default
optimization:
file.c(xx): fatal error C1001: Internal Compiler Error
(compiler file '@(#)newcode.c:1.87', line 604)
Contact Microsoft Product Support Services
RESOLUTION
Worked around this error by splitting the assignment into two
separate operations, as seen in the sample code.
STATUS
Microsoft has confirmed this to be a problem in C version 6.0. This
problem was corrected in C version 6.0a.
More Information:
Sample Code
-----------
/* Compile options needed: /AL
*/
typedef unsigned long ULONG;
typedef struct
{
ULONG a;
} A;
typedef struct
{
A b;
} B;
B far *c;
void test( void )
{
// Making two separate assignments is OK.
//
ULONG ok_1 = (c->b.a);
ULONG ok_2 = (ULONG)c + ok_1;
// But performing the same computation in one
// assignment causes an internal compiler error.
//
ULONG bomb = (ULONG)c + (c->b.a);
}
Additional reference words: 6.00