volatile void *ptr; void foo() { void *ptr2; asm("; one"); ptr2 = __builtin_gcn_get_stack_limit() ; asm("; two"); ptr = ptr2 + 1234; } volatile int b; void bar() { int v; asm("; three"); v = __builtin_gcn_first_call_this_thread_p (); asm("; four"); b = v; asm("; five"); if (v) asm(";true"); else asm(";false"); }