C9101000: C1001: regMD.c, Line 1017

ID Number: Q68445

6.00 6.00a 6.00ax | 6.00 6.00a

MS-DOS | OS/2

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

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 default optimization:

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

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

Contact Microsoft Product Support Services

RESOLUTION

The following workarounds may be used to eliminate the error:

1. Compile with /Od to disable all optimization.

-or-

2. Compile with /Ox.

-or-

3. Use the optimize pragma to turn off optimizations for the

function in which the error occurs.

-or-

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

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: <none>

*/

typedef struct

{

unsigned d : 8;

unsigned m : 8;

} SysDate;

typedef struct

{

unsigned m : 8;

unsigned h : 8;

unsigned s : 8;

} SysTime;

extern SysDate fd(void);

extern SysTime ft(void);

long gotdostime()

{

SysDate dd = fd();

SysTime tt = ft();

unsigned d = dd.d | (dd.m << 5);

unsigned t = tt.h | (tt.m << 5) | (tt.s >> 1);

return((((long)d) << 16) | t);

}

Additional reference words: 6.00 6.00a 6.00ax