re PR target/48637 (%c in ARM inline asm leads to ICE (in arm_print_operand))
authorRichard Earnshaw <rearnsha@arm.com>
Mon, 27 Jun 2011 21:09:25 +0000 (21:09 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Mon, 27 Jun 2011 21:09:25 +0000 (21:09 +0000)
PR target/48637
* arm.c (arm_print_operand): Allow sym+offset.  Don't abort on invalid
asm operands.

From-SVN: r175565

gcc/ChangeLog
gcc/config/arm/arm.c

index fe982b61539aaa917c834ac537448dded9a4d142..6ebc1ce23928aeda8b86dcb6c98dcf7a5a4ff16b 100644 (file)
@@ -1,3 +1,9 @@
+2011-06-27  Richard Earnshaw  <rearnsha@arm.com>
+
+       PR target/48637
+       * arm.c (arm_print_operand): Allow sym+offset.  Don't abort on invalid
+       asm operands.
+
 2011-06-27  Jan Hubicka  <jh@suse.cz>
 
        * ipa.c (cgraph_address_taken_from_non_vtable_p): Walk references of node
index efffcf814057a24cee7127eec589921be6781ca5..8b9cb25b49cb4544741ed753c44a378b61da4289 100644 (file)
@@ -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;