-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-11523
-
-
-
-
default
-
This attached code contains these lines ...
QualityAndStatus& qualityAndStatus = outResults.qualityAndStatus[idx]; qualityAndStatus.quality = 1.0F; qualityAndStatus.status = getResultCode(qualityAndStatus.quality, 0);
outResults is a reference to a structure defined from the caller. The value of the first parameter seen in getResultCode is 0.0F, not 1.0F.
Build it ...
$ cl6x -@options.txt -o3 file.cpp main.cpp -z -o test.out -l lnk.cmd [file.cpp] [main.cpp] <Linking>
(Note lnk.cmd is from the \lib directory of the compiler installation.)
When executed see ...
Result 1 (expect 0): 1 Result 2 (expect 0): 1
Build it again with no optimization (remove -o3) and execute it to see ...
Result 1 (expect 0): 0 Result 2 (expect 0): 0