diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 01:38:40 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-02-07 01:38:40 +0000 |
commit | db4c0bc2dc6d6daf0ed89f4e2178972aeb30411c (patch) | |
tree | 0dff9e44d22a2396c142a7018e5bd673b236bb05 /gcc/stmt.c | |
parent | 45e242025da8c6453f95f737e3534fe57db03521 (diff) | |
download | ppe42-gcc-db4c0bc2dc6d6daf0ed89f4e2178972aeb30411c.tar.gz ppe42-gcc-db4c0bc2dc6d6daf0ed89f4e2178972aeb30411c.zip |
PR c/5609
* stmt.c (resolve_operand_name_1): Take more care with mixed
named and unnamed operands.
* gcc.dg/asm-4.c: Add case with an unnamed operand in the middle.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49560 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 99f910a9d21..17b4d0b1972 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -2149,15 +2149,23 @@ resolve_operand_name_1 (p, outputs, inputs) /* Resolve the name to a number. */ for (op = 0, t = outputs; t ; t = TREE_CHAIN (t), op++) { - const char *c = IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (t))); - if (strncmp (c, p + 1, len) == 0 && c[len] == '\0') - goto found; + tree id = TREE_PURPOSE (TREE_PURPOSE (t)); + if (id) + { + const char *c = IDENTIFIER_POINTER (id); + if (strncmp (c, p + 1, len) == 0 && c[len] == '\0') + goto found; + } } for (t = inputs; t ; t = TREE_CHAIN (t), op++) { - const char *c = IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (t))); - if (strncmp (c, p + 1, len) == 0 && c[len] == '\0') - goto found; + tree id = TREE_PURPOSE (TREE_PURPOSE (t)); + if (id) + { + const char *c = IDENTIFIER_POINTER (id); + if (strncmp (c, p + 1, len) == 0 && c[len] == '\0') + goto found; + } } *q = '\0'; |