diff options
author | Jan Hubicka <jh@suse.cz> | 2006-08-04 19:05:38 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-08-04 17:05:38 +0000 |
commit | 71156bccaa2aadde4cc420bb719626c59380561b (patch) | |
tree | a50ac1e9c87f293121ff982b05433d7b518a7269 | |
parent | 9659ce8b6160434d90f8b7985921f0b05e74d2d7 (diff) | |
download | gcc-71156bccaa2aadde4cc420bb719626c59380561b.zip gcc-71156bccaa2aadde4cc420bb719626c59380561b.tar.gz gcc-71156bccaa2aadde4cc420bb719626c59380561b.tar.bz2 |
re PR rtl-optimization/26655 (ICE in ix86_secondary_memory_needed, at config/i386/i386.c:16446)
PR target/26655
PR target/28270
* reload.c (push_reload): Patch out the mismathcing instruction; return early.
(find_reload): Bail out if the instruction was patched out.
From-SVN: r115928
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/reload.c | 20 |
2 files changed, 26 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 642cde8..eb198c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2006-08-04 Jan Hubicka <jh@suse.cz> + PR target/26655 + PR target/28270 + * reload.c (push_reload): Patch out the mismathcing instruction; return early. + (find_reload): Bail out if the instruction was patched out. + +2006-08-04 Jan Hubicka <jh@suse.cz> + PR tree-optimization/24888 * tree-inline.c (expand_call_inline): Do not re-record variables. (declare_inline_vars): Add variable to unexpanded_var_list. diff --git a/gcc/reload.c b/gcc/reload.c index 616a737..c8c48b1 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -1254,7 +1254,19 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc, { error_for_asm (this_insn, "impossible register constraint " "in %<asm%>"); - class = ALL_REGS; + /* Avoid further trouble with this insn. */ + PATTERN (this_insn) = gen_rtx_USE (VOIDmode, const0_rtx); + /* We used to continue here setting class to ALL_REGS, but it triggers + sanity check on i386 for: + void foo(long double d) + { + asm("" :: "a" (d)); + } + Returning zero here ought to be safe as we take care in + find_reloads to not process the reloads when instruction was + replaced by USE. */ + + return 0; } } @@ -4133,6 +4145,12 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known, } #endif + /* If we detected error and replaced asm instruction by USE, forget about the + reloads. */ + if (GET_CODE (PATTERN (insn)) == USE + && GET_CODE (XEXP (PATTERN (insn), 0)) == CONST_INT) + n_reloads = 0; + /* Perhaps an output reload can be combined with another to reduce needs by one. */ if (!goal_earlyclobber) |