re PR rtl-optimization/21299 (internal error on invalid asm statement)
authorSteven Bosscher <steven@gcc.gnu.org>
Tue, 19 Sep 2006 21:22:31 +0000 (21:22 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Tue, 19 Sep 2006 21:22:31 +0000 (21:22 +0000)
        PR rtl-optimization/21299
        * reload1.c (reload): Purge invalid ASMs in the final pass.

From-SVN: r117061

gcc/ChangeLog
gcc/reload1.c

index 5d8aeffa59ad88200cd8fc8013115609ceadb533..835c93d3e4e11c69af443b0ac2ef347b743473a9 100644 (file)
@@ -1,3 +1,8 @@
+2006-09-19  Steven Bosscher  <steven@gcc.gnu.org>
+
+       PR rtl-optimization/21299
+       * reload1.c (reload): Purge invalid ASMs in the final pass.
+
 2006-09-19  Steve Ellcey  <sje@cup.hp.com>
 
        PR  28490
index 04f64488566b8891380453789b8116b74619df16..58f77cba520e0d57538ab4b45e2946a97f267903 100644 (file)
@@ -1167,6 +1167,20 @@ reload (rtx first, int global)
       {
        rtx *pnote;
 
+       /* Clean up invalid ASMs so that they don't confuse later passes.
+          See PR 21299.  */
+       if (asm_noperands (PATTERN (insn)) >= 0)
+         {
+           extract_insn (insn);
+           if (!constrain_operands (1))
+             {
+               error_for_asm (insn,
+                              "%<asm%> operand has impossible constraints");
+               delete_insn (insn);
+               continue;
+             }
+         }
+
        if (CALL_P (insn))
          replace_pseudos_in (& CALL_INSN_FUNCTION_USAGE (insn),
                              VOIDmode, CALL_INSN_FUNCTION_USAGE (insn));