From
http://www.fftw.org/doc/Real_002ddata-DFTs.html
fftw_plan fftw_plan_dft_r2c_1d(int n0,
double *in, fftw_complex *out,
unsigned flags);
It seems the type of the first parameter of fftw_plan_dft_r2c_1d
is an int
and not a size_t
. As your size
value is huge and looks greater than INT_MAX
, you are likely to pass a negative value to your function.