From a1b5eb9382a8b109567576fdad3fc458c35dc668 Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Mon, 27 Jun 2011 21:09:25 +0000 Subject: [PATCH] re PR target/48637 (%c in ARM inline asm leads to ICE (in arm_print_operand)) PR target/48637 * arm.c (arm_print_operand): Allow sym+offset. Don't abort on invalid asm operands. From-SVN: r175565 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm.c | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe982b61539..6ebc1ce2392 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-06-27 Richard Earnshaw + + PR target/48637 + * arm.c (arm_print_operand): Allow sym+offset. Don't abort on invalid + asm operands. + 2011-06-27 Jan Hubicka * ipa.c (cgraph_address_taken_from_non_vtable_p): Walk references of node diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index efffcf81405..8b9cb25b49c 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -16242,8 +16242,17 @@ arm_print_operand (FILE *stream, rtx x, int code) output_addr_const (stream, x); break; + case CONST: + if (GET_CODE (XEXP (x, 0)) == PLUS + && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF) + { + output_addr_const (stream, x); + break; + } + /* Fall through. */ + default: - gcc_unreachable (); + output_operand_lossage ("Unsupported operand for code '%c'", code); } return; -- 2.30.2