RC2, RC6, and RC7 are connected to a 220 ohm resistor and an LED in series then to ground. Each LED is tested working.
Running the above program, the RC7 measure about GND, RC6 is about 1.5v (and about 3.3v on the onboard red LED, which is on), and RC2 appears to be floating (random very low voltages).
Program is compiled with /opt/sdcc/bin/sdcc --use-non-free -mpic16 -ppic18f25k50 main.c
. The linker script is modified from
CODEPAGE NAME=page START=0x0 END=0x7FFF
to
CODEPAGE NAME=page START=0x2000 END=0x7FFF