Is There a Way to Disable Code Optimization in VectorCast?

  • Thread starter Thread starter rdsingh
  • Start date Start date
  • Tags Tags
    Vector
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
rdsingh
Messages
1
Reaction score
0
I am using VectorCast tool to Unit Test the code written in C language.

Brief Description:-The following piece of code (which is present in source code) is getting optimized in VectorCast at Disassembly Level. Hence, the code is not even visible in VectorCast Disassembly.

Details:-

In Function ffx_ScheduleInsertCCEvent() :- The Following Code is getting Optimized in VectorCast automatically and hence, the If condition is not getting hit.

if ( FFX_Scheduler.PendingCCFreeList == NULL )
{
#ifdef SIMULATION_BUILD
TRAP();
#else
FM_ASSERTION_RESET_FAULT( AF_FFX_PCCLIST_OVERFLOW, (UINT32) Signal, callers_address() );
#endif
}

Due to the Code Optimization by VectorCast, the piece of code is not visible in the Disassembly while debugging. Plus, the FM_ASSERTION_RESET_FAULT is not getting hit and the Test case is getting terminated Abnormally.

Does anybode has a solution to this problem.
 
Physics news on Phys.org
I'm not familiar with VectorCast, but is there some way to turn off code optimization? I would think there's a flag you could set when the code is compiled. I would take a look at the documentation for this tool to see if that is a possibility.