C9105000: C1001: getattr.c, Line 175

ID Number: Q72526

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 optimization. The specific errors differ depending

on whether the real mode (DOS) or protected mode (OS/2) version of the

compiler is being used and whether the quick compile (/qc) option has

been specified.

Under DOS

---------

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

(compiler file '@(#)getattr.c:1.73', line 175)

Contact Microsoft Product Support Services

Compiling under DOS with /qc eliminates this error.

Under OS/2

----------

Command line error D2030 : INTERNAL COMPILER ERROR in 'P1'

Contact Microsoft Product Support Services

Under OS/2 (with /qc)

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

Command line error D2030 : INTERNAL COMPILER ERROR in 'QC'

Contact Microsoft Product Support Services

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

-----------

#define _NULLSEG ((_segment)0)

#define _NULLOFF ((void _based(void) *)0xffff)

typedef unsigned int size_t;

_segment _cdecl _bheapseg(size_t);

void _based(void) * _cdecl _bmalloc(_segment, size_t);

int _cdecl printf(const char *, ...);

int main(void);

int scrninit(void);

_segment bscrnbase;

char (_based(bscrnbase) *bscrn)[25][80][2];

int main(void)

{

printf("Passed\n");

return(0);

}

int scrninit()

{

if((bscrnbase=_bheapseg(sizeof((*bscrn))))==_NULLSEG)

return(1);

if(((*bscrn)=_bmalloc(bscrnbase,sizeof((*bscrn))))==_NULLOFF);

return(1);

return(0);

}

Additional referenced words: 6.00 6.00a 6.00ax