C9106000: C1001: exphelp.c, Line 370

ID Number: Q72653

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, any memory model that uses /Aw or

/Au, and /FPi or FPi87:

With C 6.0a and 6.0ax

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

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

(compiler file '@(#)exphelp.c:1.117', line 370)

Contact Microsoft Product Support Services

With C 6.0

----------

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

(compiler file '@(#)exphelp.c:1.115', line 370)

Contact Microsoft Product Support Services

Note: Some options, such as /ML, /MT, and /MD imply the /Aw switch

without explicitly stating it.

RESOLUTION

There are several ways to work around this problem:

1. Break the complex expression into smaller subexpressions by

using temporary variables. This is the easiest solution in this

particular case.

-or-

2. Use a memory model where SS == DS.

-or-

3. 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: /ALw /FPi /c

*/

double func(double);

void main(double *client)

{

register int i;

double rslt;

double monthly[3];

double monthly_charges[3];

rslt = 0.0;

monthly[i] = func( monthly[i] * 100000.0) / 100000.0;

rslt += (monthly[i] * 12 * *client);

/* To work around the problem, simplify Line the following line. */

rslt += (monthly_charges[i] * 12);

}

Additional reference words: 6.00 6.00a 6.00ax