Hello This isn't real code, it's just an example to ask this question: Would GCC optimizer ever re-order these statements and cause a NULL ptr de-reference SIGSEGV? I recall reading a Chris Lattner paper indicating it could happen. void f(int * p) { if(!p) { return; } printf("%d\n", *p); } I which case, a lot of production code faces issues, must be changed to: void f(int * p) { if(p) { printf("%d\n", *p); } } Jonny