CMSIS code: TIMER0_IRQHandler()

I am using CMSIS code.

I have the following ISR to blink an LED:

extern “C”{
void TIMER0_IRQHandler() {
LPC_TIM0->IR =1;

LPC_GPIO1->FIOPIN ^=(1 << 23); }}

It works perfectly!
If I swap the two statements inside the lSR, It stopped working!!!
Any possible explanation?

Thanks