Currently, when using cnn on CUDA, compiling with GCC 4.9.3, segfaults occur when using the default optimization setting of -O2. This is not a problem on GCC 4.8.*, but may be a problem on other versions of GCC.
We don't currently know the cause, but a patch fixing the bug would be welcome. If you want a quick fix, find the line including APPEND CUDA_NVCC_FLAGS in cnn/CMakeLists.txt and change -O2 to -O1.