diff options
author | Roger Sayle <roger@eyesopen.com> | 2002-11-04 00:22:57 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2002-11-04 00:22:57 +0000 |
commit | c9fe6f9f39ac5003dd6642d3d708c6818e99223e (patch) | |
tree | fd59bef0c3a68563a18ad6c574fef1d223d6241c | |
parent | 0b40e88e1029d52f5b177a9595a230c9989efc72 (diff) | |
download | gcc-c9fe6f9f39ac5003dd6642d3d708c6818e99223e.zip gcc-c9fe6f9f39ac5003dd6642d3d708c6818e99223e.tar.gz gcc-c9fe6f9f39ac5003dd6642d3d708c6818e99223e.tar.bz2 |
re PR c/7128 (Undeclared variables as asm argument cause ICE)
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/c-typeck.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 148d506..1d44953 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 0915b10..db6d420 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -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. */ |