PIC18F4520 failed using internal oscillator at 1MHz
A few observations.  I'm using this datasheet as a reference.

Oscillator selection

Your problem appears to be a conflict between the datasheet and the compiler documentation.  Here we see the list of possible oscillator types (datasheet page 23):



However according to the PIC18 Configuration Settings Addendum the options are named differently in the C18 tool suite (page 131):



Setting OSC to INTIO7 will give an output of FOSC/4 (the instruction clock) on the OSC2 pin (RA6).  This might not be desirable, for a fully internal clock you might want INTIO67 instead.

Oscillator setup

You don't actually need to change OSCCON during initialisation if you want a 1Mhz output because that's the default.  You can see this in the datasheet (page 30):


  bit 6-4 IRCF2:IRCF0: Internal Oscillator Frequency Select bits
  
  
  100 = 1 MHz(3)
  
  
  3 - Default output frequency of INTOSC on Reset. 


Additionally you should wait for the internal oscillator to be stable before continuing.  You can do this by monitoring the IOFS bit of OSCCON.  I'm not sure how C18 presents this register, but something like the following would work:

// Wait for the internal oscillator to be stable
while(!(OSCCON &amp; 0b100));


Note you can also use either of these which are exactly equivalent.  All are likely to compile to the same bit-test instruction (e.g. btfss):

while(OSCCONbits.IOFS == 0);
while(!OSCCONbits.IOFS);


Lack of main loop

You have no main loop, as observed by Roger in the comments.  Generally you would do your work in a look like:

void main() {
    // Setup ports and internal features

    // Main program
    while(1) {
        // Do your work here, which repeats forever
    }

    // Execution will never reach here
}


Include syntax

Your comments suggest you received this error:

PIC18F4520\pwm.c:1:Error [1026] malformed #include directive


This is because you need angle brackets around the #include directives, like so:

#include &lt;p18cxxx.h&gt;


Take a look at this Stackoverflow question for a thorough explanation on why.