I've added these flags (mode=DebugMode,DebugMode.check_preallocated_output=ALL) in my .theanorc. Then changed ``cumsum(x).sum()`` to ``cumsum(x)``. When I run the tests, it still prints (nil) each time the C function is called.

Maybe I didn't understand what @nouiz said.