* porting 8051: Internal compiler error in `instantiate_virtual_regs_1', at function.c:4027
@ 2000-03-21 12:19 Thomas Schuetzkowski
2000-03-21 16:23 ` Martin v. Loewis
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schuetzkowski @ 2000-03-21 12:19 UTC (permalink / raw)
To: gcc
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2784 bytes --]
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_/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: porting 8051: Internal compiler error in `instantiate_virtual_regs_1', at function.c:4027
2000-03-21 12:19 porting 8051: Internal compiler error in `instantiate_virtual_regs_1', at function.c:4027 Thomas Schuetzkowski
@ 2000-03-21 16:23 ` Martin v. Loewis
0 siblings, 0 replies; 2+ messages in thread
From: Martin v. Loewis @ 2000-03-21 16:23 UTC (permalink / raw)
To: Thomas.Schuetzkowski; +Cc: gcc
> How can I find out about that problem and fix it?
I can't answer your other questions, but I can answer this one :-)
Start a debugger for cc1, and run the program. Set a breakpoint on
fatal(), so you'll catch the internal error. When the breakpoint is
reached, go to the instantiate_virtual_regs_1 stack frame and inspect
the local variables.
Regards,
Martin
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-03-21 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-03-21 12:19 porting 8051: Internal compiler error in `instantiate_virtual_regs_1', at function.c:4027 Thomas Schuetzkowski
2000-03-21 16:23 ` Martin v. Loewis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).