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

Honored Contributor II



I have a C code written that uses kiss_fft (fast fourier transform). 


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? 


0 Kudos
0 Replies