nvcc + CMake Segmentation Faulting?

So, this is causing a segmentation fault in nvcc with CMake.

Particularly when I assign the rvalue reference does it freak out. If I comment out the assignment, the code will compile fine. What could be the reason for this? Am I doing somethign horribly wrong?

So, this is just a theory, but I think it was because I had a bug in my code. Namely, my create_diagonal method was incrementing i instead of j in the inner for-loop. Now, maybe, just maybe, this was all being evaluated at compile-time and that’s why the compiler was segfaulting because I’m able to use the routine in other pieces of the code as well. I think in the one context that I using it in, the compiler had enough info that it attempted to evaluate it. Maybe. I could be horribly off base here.

Segfaults are not a reasonable response by any compiler to a broken piece of code. If you are using either CUDA 7.5 or 8.0 RC, I would suggest you reduce your code to the smallest possible self-contained repro code and file a bug with NVIDIA.

Alright, that sounds like a good idea. I’ll try that when I get home. And yeah, I’m using CUDA 8 right now. I just wanted to be on top of the latest and greatest! T_T