Click here to Skip to main content
15,905,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Release Code Optimization Problems.. Pin
Saurabh.Garg21-May-06 16:36
Saurabh.Garg21-May-06 16:36 
GeneralRe: Release Code Optimization Problems.. Pin
rbid22-May-06 8:23
rbid22-May-06 8:23 
AnswerRe: Release Code Optimization Problems.. Pin
Ryan Binns20-May-06 1:53
Ryan Binns20-May-06 1:53 
GeneralRe: Release Code Optimization Problems.. Pin
rbid20-May-06 5:04
rbid20-May-06 5:04 
GeneralRe: Release Code Optimization Problems.. Pin
Ryan Binns20-May-06 14:38
Ryan Binns20-May-06 14:38 
GeneralRe: Release Code Optimization Problems.. Pin
rbid22-May-06 8:28
rbid22-May-06 8:28 
AnswerRe: Release Code Optimization Problems.. Pin
Ray Hagstrom20-May-06 8:46
Ray Hagstrom20-May-06 8:46 
GeneralRe: Release Code Optimization Problems.. Pin
rbid20-May-06 10:17
rbid20-May-06 10:17 
Ray Hagstrom wrote:
ForumVisual C++ / MFC
Subject:Re: Release Code Optimization Problems..
Sender:Ray Hagstrom
Date:14:46 20 May '06

Sounds a lot like scientific programming.


I'm doing some system verification code, the system guys use Matlab for generating their models, and I run some "C" code to verify their models.

Ray Hagstrom wrote:
1.)Array overrun (Solution: interface array access through an intermediary function that executes a bunch of assert(); to verify that access is always within bounds. The asserts all dissappear in the release mode so that they do not slow production down at all.)


Yes, But this could also happen in the Debug or Release without speed optimization, and it does not happen, the problem arises only when I compile the code with speed optimization (/O2 flag) (PC-Lint[^] did not find any access out of bounds in the code)

Ray Hagstrom wrote:
2.)Optimizer bug. (Here the machine-code generated by the compiler is just flat wrong. Every mature scientific programmer must be prepared to deal with this horrible sort of problem. I have NEVER (since 1965) dealt with a compiler that I did not find bugs in its code generation. Here, my best approach is to start backward from the crash line. Either some datum going into the crash is wrong or the line is encoded wrong.)


The program does not crash, but produces wrong results when compiled with the optimize for speed flag. I'm currently adding some TRACE lines to print out the computed results and then compare them with the Debug (or Release without code optimization).. but that is like looking for a needle in a montain of hay Cry | :((

Any additional hint?

Thanks to all in advance. Rose | [Rose]

-- Ricky Marek (AKA: rbid)
-- "Things are only impossible until they are not" --- Jean-Luc Picard

My articles
AnswerSummary... Pin
rbid24-May-06 8:19
rbid24-May-06 8:19 
QuestionString Conversion Pin
satsumatable19-May-06 19:50
satsumatable19-May-06 19:50 
AnswerRe: String Conversion [modifed] Pin
Nibu babu thomas19-May-06 20:04
Nibu babu thomas19-May-06 20:04 
GeneralRe: String Conversion Pin
satsumatable19-May-06 20:16
satsumatable19-May-06 20:16 
GeneralRe: String Conversion Pin
Nibu babu thomas19-May-06 20:20
Nibu babu thomas19-May-06 20:20 
GeneralRe: String Conversion Pin
NiceNaidu19-May-06 20:32
NiceNaidu19-May-06 20:32 
GeneralRe: String Conversion Pin
Nibu babu thomas19-May-06 20:36
Nibu babu thomas19-May-06 20:36 
GeneralRe: String Conversion [modifed] Pin
satsumatable19-May-06 20:42
satsumatable19-May-06 20:42 
QuestionMutiple document Templates Pin
RockyJames19-May-06 19:45
RockyJames19-May-06 19:45 
AnswerRe: Mutiple document Templates Pin
Nibu babu thomas19-May-06 19:57
Nibu babu thomas19-May-06 19:57 
GeneralRe: Mutiple document Templates Pin
RockyJames19-May-06 20:27
RockyJames19-May-06 20:27 
JokeRe: Mutiple document Templates Pin
Nibu babu thomas19-May-06 20:39
Nibu babu thomas19-May-06 20:39 
QuestionHow To Trap esc key code for Dailog Application Pin
CodeVarma19-May-06 19:24
CodeVarma19-May-06 19:24 
AnswerRe: How To Trap esc key code for Dailog Application [modifed] Pin
_AnsHUMAN_ 19-May-06 19:26
_AnsHUMAN_ 19-May-06 19:26 
AnswerRe: How To Trap esc key code for Dailog Application Pin
Laxman Auti19-May-06 20:05
Laxman Auti19-May-06 20:05 
AnswerRe: How To Trap esc key code for Dailog Application Pin
Rajesh R Subramanian19-May-06 21:17
professionalRajesh R Subramanian19-May-06 21:17 
Questionl don't know how to use iocp? please tell me how to do? Pin
YuxiLv19-May-06 16:44
YuxiLv19-May-06 16:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.