This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/58442] bootstrapping vax crashes on NetBSD
- From: "martin at netbsd dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Sep 2013 20:43:15 +0000
- Subject: [Bug target/58442] bootstrapping vax crashes on NetBSD
- Auto-submitted: auto-generated
- References: <bug-58442-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58442
--- Comment #4 from Martin Husemann <martin at netbsd dot org> ---
I stared at the assembly a bit more (but my vax fu is weak):
we are in the last line of
216 #line 781 "../../gcc-4.8.1/gcc/config/vax/vax.md"
217 ((INTVAL (operands[1]) == 8 || INTVAL (operands[1]) == 16)
218 && INTVAL (operands[2]) % INTVAL (operands[1]) == 0
219 && (REG_P (operands[0])
220 || ! mode_dependent_address_p (XEXP (operands[0], 0),
221 MEM_ADDR_SPACE (operands[0])))))
and doing:
0x92cda2 <recog_1(rtx, rtx, int*)+936>:
movl *0xef3cfc <_GLOBAL_OFFSET_TABLE_+1548>,r0
this is r0 = operands[0]
MEM_ADDR_SPACE(RTX) is get_mem_attrs (RTX)->addrspace) so we do the call:
0x92cda9 <recog_1(rtx, rtx, int*)+943>: pushl r0
0x92cdab <recog_1(rtx, rtx, int*)+945>:
calls $0x1,0x92c99e <get_mem_attrs(const_rtx)>
and apparently get_mem_attrs(operand[0]) returned 4, which we then deref to
->addrspace and crash.