aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-11-27 13:38:32 +0000
committerJakub Jelinek <jakub@redhat.com>2012-11-27 13:38:32 +0000
commit1dcecabe3976bd374916af619ea5cea2509293f2 (patch)
tree941b5bee287577b067bb5f92955bf88d7fdcef6c /gcc/function.c
parente154f6fbdcf146d097cde4ce00097b7b8863ad6b (diff)
PR middle-end/52650
* function.c (instantiate_virtual_regs_in_insn): Don't delete invalid asm gotos, instead just clear their template and inputs. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193846 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 9a8e0aed7e2..9ef6f77f6e5 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