Add test for freevar in cuda macros