ATMEGA2560 using UART interrupt to control global flag : I recently met a problem when I was playing with ATMEGA2560, and I really don't understand what's wrong with it. 

Here is my code.

main : http://pastebin.com/raw/pNuKw1cF

IRQ  : http://pastebin.com/raw/uhz1uBUZ

The problem is : 
When I received some datas from USART , I tried to set a RxFlag that can active the if-statement in main loop. But it didn't work , till I uncommented the function before if-statement which may be a _delay_ms() or a printf().

It make no sense. 
What I remember is that I don't need those functions and it can still set the global variables to affect main loop.
Or is there any detail I had missed?
Please give me some clue to figure out , I was confused.