This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/49721] convert_memory_address_addr_space may generate invalid new insns
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 2 Aug 2011 19:29:13 +0000
- Subject: [Bug middle-end/49721] convert_memory_address_addr_space may generate invalid new insns
- Auto-submitted: auto-generated
- References: <bug-49721-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49721
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> 2011-08-02 19:29:12 UTC ---
combine.c has
/* Allocate array for insn info. */
max_uid_known = get_max_uid ();
uid_log_links = XCNEWVEC (struct insn_link *, max_uid_known + 1);
uid_insn_cost = XCNEWVEC (int, max_uid_known + 1);
gcc_obstack_init (&insn_link_obstack);
combine isn't prepared to deal with new insns generated by
convert_memory_address_addr_space and it accesses invalid
memory in
FOR_EACH_LOG_LINK (link, temp)
if (link->insn == i2)
link->insn = i3;
on those newly generated insns.