In our source we have not been marking any local variables with the "register" keyword. The variables are just allocated by the compiler to be held in registers as an optimization. The following function has been stripped down for space reasons. In this function the compiler places the dDenMin variable in a register. When I set a breakpoint on the line indicated below the dDenMin variable reads 0.0 in both the Variables window and in the tooltip. The dDenMax variable (on the stack) reads correctly. Hope this helps. It is difficult to give you sample code that definitively demonstrates the issue.
DWORD ProcessApi1162(WORD wApiFunct, void *pApi11In)
{
WORD wIterationDex, wTableSelect;
double dAlpha60;
double dTemp, dDen60Sqr, dE, dDeltaDen60;
double dTerm, dDenMin, dDenMax, dDeltaT, dDeltaTx1P6, dDt, dDiffAlpha, dDp;
if(wTableSelect == PROD_SPECIAL_APPS || wTableSelect == PROD_TAB_24C || wTableSelect == PROD_TAB_6C)
{
/* validate Alpha 60 */
if(dAlpha60 < (float)0.00023 || dAlpha60 > (float)0.00093)
return (DPCL_SETFCID(FCID_API11P1) | DPCL_SETECLASS(ECLASS_ARG_INVALID) | DPCL_SETECODE(ECODE_ALPHA));
}
else // validate Density 60
{
switch(wTableSelect)
{
case PROD_CRUDE:
case PROD_TAB_23A_24A:
case PROD_TAB_5A_6A:
dDenMin = 470.5;
dDenMax = 1201.8;
break; // set breakpoint here - dDenMin reads 0.0 while dDenMax reads 1201.8
case PROD_REFINED:
case PROD_TAB_23B_24B:
case PROD_TAB_5B_6B:
dDenMin = 470.4;
dDenMax = 1209.5;
break;
case PROD_LUBE_OIL:
case PROD_TAB_53D_54D:
default:
dDenMin = 714.3;
dDenMax = 1208.3;
break;
}
}
return (DPCL_SETFCID(FCID_API11P1) | DPCL_SETECODE(ECODE_SUCCESS)); // 7-28-11
}