Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
12599 Discussions

If condition false, but statements inside the loop are still executed

Altera_Forum
Honored Contributor II
1,134 Views

Hello, 

 

I have a C code written that uses kiss_fft (fast fourier transform). http://sourceforge.net/projects/kissfft/ 

 

The code runs just fine using Eclipse IDE. But when I run the same code using DS-5 (Cyclone 5 SoC), in one of the kiss fft function, the if statement is executed even though the condition is false. It is not supposed to. And then there is a segmentation fault (SIGSEV signal 11). 

 

if (st->inverse) 

phase *= -1; 

 

From the attached images, st->inverse has the value 0. So the if condition is false and should not enter the loop but it does so regardless. I do not understand why. Anybody has had the same issue? or any suggestions? 

 

Thanks.
0 Kudos
0 Replies
Reply