When you use the -Ostk option, the compiler analyzes which local variables are alive simultaneously. Based on that analysis the compiler chooses the best memory layout for for variables. When using -Ostk, two or more variables may end up sharing the same memory location.