GP5 is the input, right? So if that stays low, what is it connected to?
Assuming you have real hardware tie an LED (with a series resistor) to GP0 and use that LED as a signal to find out where your program actually comes (I am not familiar with the XC8 compiler so might have the syntax wrong):
gp0=1;
while(1);
This always helps me to find out where my program takes an unexpected left turn.
And I presume you have executed the mandatory 'blink-a-led' exercise with your hardware to make sure the controller actually runs (has power on the right pins, has its oscillator and fuses configured correctly).
Paul