Ian Lance Taylor - PATCH COMMITTED: Fix for PR middle-end/30751 (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Ian Lance Taylor
- To: gcc-patches at gcc dot gnu dot org
- Date: 13 Feb 2007 14:21:17 -0800
- Subject: PATCH COMMITTED: Fix for PR middle-end/30751
PR 30751 is about a case where lower-subreg.c causes an ICE compiling Java code. The problem was a MEM which used a SUBREG of a DImode pseudo, which caused the insn to fail to be recognized by the code which decomposes SUBREGs. This patch fixes it.
Bootstrapped and tested on i686-pc-linux-gnu and sparc-sun-solaris2.10. Committed.
Ian
2007-02-13 Ian Lance Taylor iant@google.com
PR middle-end/30751
* lower-subreg.c (resolve_simple_move): Decompose subregs in
addresses.
Index: lower-subreg.c
--- lower-subreg.c (revision 121893) +++ lower-subreg.c (working copy) @@ -501,7 +501,7 @@ resolve_subreg_use (rtx *px, void *data) that the note must be removed. */ if (!x) { - gcc_assert(!insn); + gcc_assert (!insn); return 1; }
@@ -711,6 +711,23 @@ resolve_simple_move (rtx set, rtx insn) return insn; }
- /* It's possible for the code to use a subreg of a decomposed
register while forming an address. We need to handle that before
passing the address to emit_move_insn. We pass NULL_RTX as the
insn parameter to resolve_subreg_use because we can not validate
the insn yet. */
- if (MEM_P (src) || MEM_P (dest))
- {
int acg;
if (MEM_P (src))
- for_each_rtx (&XEXP (src, 0), resolve_subreg_use, NULL_RTX);
if (MEM_P (dest))
- for_each_rtx (&XEXP (dest, 0), resolve_subreg_use, NULL_RTX);
acg = apply_change_group ();
gcc_assert (acg);
- }
- /* If SRC is a register which we can't decompose, or has side effects, we need to move via a temporary register. */
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |