Let see together a practical demonstartion.
If we consider the following code:
|
|
And compile it using gcc with -S option we obtain:
|
|
As we can see, the compiler, even without the selection of optimization options, optimize the code and translate a= 1+3 as movl $4, -4(%ebp), that is a =4.
Q.E.D. :)