Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Honored Contributor I
728 Views

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

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