diff options
author | Jakub Jelinek <jakub@redhat.com> | 2012-11-27 14:38:32 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2012-11-27 14:38:32 +0100 |
commit | 5a8608353261070997bb1bc54e16f5eba8436b5d (patch) | |
tree | 941b5bee287577b067bb5f92955bf88d7fdcef6c /gcc | |
parent | 7fc3eedbebe589acc8bab41475f29a40383e8df3 (diff) | |
download | gcc-5a8608353261070997bb1bc54e16f5eba8436b5d.zip gcc-5a8608353261070997bb1bc54e16f5eba8436b5d.tar.gz gcc-5a8608353261070997bb1bc54e16f5eba8436b5d.tar.bz2 |
re PR middle-end/52650 (FAIL: gcc.dg/torture/pr51106-2.c * (internal compiler error))
PR middle-end/52650
* function.c (instantiate_virtual_regs_in_insn): Don't delete invalid
asm gotos, instead just clear their template and inputs.
From-SVN: r193846
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/function.c | 13 |
2 files changed, 16 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 23ec9aa..5a18b15 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2012-11-27 Jakub Jelinek <jakub@redhat.com> + PR middle-end/52650 + * function.c (instantiate_virtual_regs_in_insn): Don't delete invalid + asm gotos, instead just clear their template and inputs. + PR tree-optimization/55110 * tree-vect-loop.c (vectorizable_reduction): Don't assert that STMT_VINFO_RELATED_STMT of orig_stmt is stmt. diff --git a/gcc/function.c b/gcc/function.c index 9a8e0ae..9ef6f77 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1738,7 +1738,18 @@ instantiate_virtual_regs_in_insn (rtx insn) if (!check_asm_operands (PATTERN (insn))) { error_for_asm (insn, "impossible constraint in %<asm%>"); - delete_insn_and_edges (insn); + /* For asm goto, instead of fixing up all the edges + just clear the template and clear input operands + (asm goto doesn't have any output operands). */ + if (JUMP_P (insn)) + { + rtx asm_op = extract_asm_operands (PATTERN (insn)); + ASM_OPERANDS_TEMPLATE (asm_op) = ggc_strdup (""); + ASM_OPERANDS_INPUT_VEC (asm_op) = rtvec_alloc (0); + ASM_OPERANDS_INPUT_CONSTRAINT_VEC (asm_op) = rtvec_alloc (0); + } + else + delete_insn (insn); } } else |