Code causes nvcc.exe to crash

I made nvcc.exe crash in windows xp 32bit, cuda4:

Here’s the error message:

1>### Assertion failure at line 282 of …/…/be/cg/NVISA/exp_loadstore.cxx:

1>### Compiler Error in file C:/DOCUME~1/user/LOCALS~1/Temp/tmpxft_00000e2c_00000000-11_HarrisFilter.cpp3.i during Code_Expansion phase:

1>### unknown memory space

1>nvopencc ERROR: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v4.0\bin/…/open64/lib//be.exe returned non-zero status 1

It crashed while attempting to compile the following code:

typedef texture<ushort2, 2, cudaReadModeElementType> pyrslice_ref;

pyrslice_ref pyramid0_tex; 

pyrslice_ref pyramid1_tex; 


pyrslice_ref &get_ref(int level)


    if (level == 0) 

        return pyramid0_tex;


        return pyramid1_tex;


Just figured nvidia would like to know about this…

This is an internal compiler error (meaning something is happening inside the compiler that should not be happening). Since you already have a repro case in hand, it would be very helpful if you could file a bug for this (via the link on the registered developer website). Thank you for your help!