re PR c/7128 (Undeclared variables as asm argument cause ICE)
authorRoger Sayle <roger@eyesopen.com>
Mon, 4 Nov 2002 00:22:57 +0000 (00:22 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Mon, 4 Nov 2002 00:22:57 +0000 (00:22 +0000)
PR c/7128
* c-typeck.c (c_expand_asm_operands): Defend against
error_mark_nodes in the output argument to avoid ICE.

From-SVN: r58777

gcc/ChangeLog
gcc/c-typeck.c

index 148d5066aef13aab9c89570d6e5a902ce936561a..1d44953be654942bdc5ddeb381e02c0b0691b704 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-03  Roger Sayle  <roger@eyesopen.com>
+
+       PR c/7128
+       * c-typeck.c (c_expand_asm_operands): Defend against
+       error_mark_nodes in the output argument to avoid ICE.
+
 2002-11-03  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR middle-end/8408
index 0915b1091c8c10964e89072956b96d21ba9a967b..db6d420cc6e527ae36882cbccce13786800e3ad2 100644 (file)
@@ -6957,7 +6957,11 @@ c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
 
   /* Record the contents of OUTPUTS before it is modified.  */
   for (i = 0, tail = outputs; tail; tail = TREE_CHAIN (tail), i++)
-    o[i] = TREE_VALUE (tail);
+    {
+      o[i] = TREE_VALUE (tail);
+      if (o[i] == error_mark_node)
+       return;
+    }
 
   /* Generate the ASM_OPERANDS insn; store into the TREE_VALUEs of
      OUTPUTS some trees for where the values were actually stored.  */