porting 8051: Internal compiler error in `instantiate_virtual_regs_1', at function.c:4027

Thomas Schuetzkowski Thomas.Schuetzkowski@web.de
Tue Mar 21 12:19:00 GMT 2000


Dear GCC-Developers,

if i compile a simple program like the following using the generated cc1
compiler,
everything seems to be ok and assembler code is generated.

        int main(void)
        {
          int i;
          return 0;
        }

the debugoption -dr produces the following rtl-code:

        ;; Function main

        (note 2 0 3 "" NOTE_INSN_DELETED)

        (note 3 2 4 "" NOTE_INSN_FUNCTION_BEG)

        (note 4 3 5 "" NOTE_INSN_DELETED)

        (call_insn 5 4 7 (call (mem:HI (symbol_ref:HI ("__main")) 0)
                (const_int 0 [0x0])) -1 (nil)
            (nil)
            (nil))

        (note 7 5 10 0 NOTE_INSN_BLOCK_BEG)

        (insn 10 7 11 (set (reg/i:HI 2 R2)
                (const_int 0 [0x0])) -1 (nil)
            (nil))

        (insn 11 10 12 (use (reg/i:HI 2 R2)) -1 (nil)
            (nil))

        (jump_insn 12 11 13 (set (pc)
                (label_ref 18)) -1 (nil)
            (nil))

        (barrier 13 12 15)

        (note 15 13 16 0 NOTE_INSN_BLOCK_END)

        (note 16 15 18 "" NOTE_INSN_FUNCTION_END)

        (code_label 18 16 0 2 "" [num uses: 0])


If I add a value like

        int main(void)
        {
          int i;
          i=0;
          return 0;
        }

the compiler calls abort().

        test1.c: In function `main':
        test1.c:6: Internal compiler error in
`instantiate_virtual_regs_1', at function.c:4027

 -dr  produces the rtl-code:

        ;; Function main

        (note 2 0 3 "" NOTE_INSN_DELETED)

        (note 3 2 4 "" NOTE_INSN_FUNCTION_BEG)

        (note 4 3 5 "" NOTE_INSN_DELETED)

        (call_insn 5 4 7 (call (mem:HI (symbol_ref:HI ("__main")) 0)
                (const_int 0 [0x0])) -1 (nil)
            (nil)
            (nil))

        (note 7 5 10 0 NOTE_INSN_BLOCK_BEG)

        (insn 10 7 13 (set (mem/f:HI (reg:HI 38) 0)
                (const_int 0 [0x0])) -1 (nil)
            (nil))

        (insn 13 10 14 (set (reg/i:HI 2 R2)
                (const_int 0 [0x0])) -1 (nil)
            (nil))

        (insn 14 13 15 (use (reg/i:HI 2 R2)) -1 (nil)
            (nil))

        (jump_insn 15 14 16 (set (pc)
                (label_ref 21)) -1 (nil)
            (nil))

        (barrier 16 15 18)

        (note 18 16 19 0 NOTE_INSN_BLOCK_END)

        (note 19 18 21 "" NOTE_INSN_FUNCTION_END)

        (code_label 21 19 0 2 "" [num uses: 0])

the only difference is that memory must be allocated to store the value,
so
that must be the reason why the compiler aborts.
I don´t have an idea why this happens. Is this a problem in addressing?
Is there something wrong with the mov-insns or would a gen*-program tell
me about a problem?
How can I find out about that problem and fix it?

Thanks,
  Thomas


-- 
\|/ ______ \|/
"@'/  ,.  \'@"
/__| \__/ |__\
    \__U_/


More information about the Gcc mailing list