Thanks John and Ian. @John Until you posted this, i never thought like that. I get what you have mentioned in post and when tried with function rather than in main {} as mentioned by Ian too, i get what i expect. But why does optimizer does so? Where is the assembly or data gone when doing the earlier way, because if we put some data into registers and done some manipulations, then where are they gone from assembly. I think my question has answer in your post ( " optimizer ignores the data and computation") , but i am still not getting it correctly. -- View this message in context: http://old.nabble.com/optimization-options-not-working-tp27637400p27752183.html Sent from the gcc - Help mailing list archive at Nabble.com.