int *ptr; __attribute__((noinline)) void foo(void) { int a; ptr = &a; } int main(void) { foo(); return *ptr; // Error }