How to use clock function in device code in cuda 3.2?

I tried to use clock function in device code and get the error

1>### Assertion failure at line 1198 of …/…/be/cg/NVISA/exp_loadstore.cxx:
1>### Compiler Error in file C:/Users/Lev/AppData/Local/Temp/tmpxft_00000a4c_00000000-9_file.cpp3.i during Code_Expansion phase:
1>### unrecognized extern symbol: clock
1>nvopencc ERROR: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v3.2\bin/…/open64/lib//be.exe returned non-zero status 1

I use win7 64bit, cuda3.2 msvs8.0 32 bit mode

Ok, this was my error, but I got strange response from compiler. I incedentally wrote t=clock instead of t=clock(). And compiler gave that message.

This kind of error message indicates that there is some problem internal to the compiler (in addition to the problem in the source code, which the compiler diagnosed correctly). It would be helpful if you could post a self-contained repro case so I can followup with the compiler team. Thanks!

I could not reproduce it anymore, it now gives me normal compilation error warning. However, it goes with another compiler bug, I have

clock_t t1


somewhere deep in kernell


it does not work, it gives incorrect clock, while

if i put t1 to shared memory array, it works. I have a big register pressure, seems like compiler does not like to keep unneccesary timing variable.