From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rth@cygnus.com, patches@x86-64.org Subject: another reload fix for SH Date: Wed, 15 Aug 2001 07:28:00 -0000 Message-id: <20010815162800.O19872@atrey.karlin.mff.cuni.cz> X-SW-Source: 2001-08/msg00920.html Hi, this patch solves the sh newlib build failure. As I've bugreported earlier, merge_assigned_reloads calls reg_overlap_mentioned_for_reload_p with first operand being address reloaded. The function expects just simple objects (memory, register, constant etc.) and crashes. Proper fix appears to be to avoid attempts to combine with addresses, as the code does not appear to be designed for such trick. I am regtesting/bootstrapping the patch on i386 together with previous fix. Honza Wed Aug 15 16:25:28 CEST 2001 Jan Hubicka * reload1.c (merge_assigned_reloads): Do not attempt to merge addresses. Index: reload1.c =================================================================== RCS file: /cvs/gcc/egcs/gcc/reload1.c,v retrieving revision 1.286 diff -c -3 -p -r1.286 reload1.c *** reload1.c 2001/08/13 15:52:21 1.286 --- reload1.c 2001/08/15 14:24:59 *************** merge_assigned_reloads (insn) *** 6075,6080 **** --- 6075,6082 ---- for (j = 0; j < n_reloads; j++) if (rld[j].in != 0 && rld[j].when_needed != RELOAD_OTHER + && rld[j].when_needed != RELOAD_FOR_OUTPUT_ADDRESS + && rld[j].when_needed != RELOAD_FOR_INPUT_ADDRESS && reg_overlap_mentioned_for_reload_p (rld[j].in, rld[i].in)) rld[j].when_needed