diff options
author | Richard Henderson <rth@redhat.com> | 2002-02-06 17:38:40 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-02-06 17:38:40 -0800 |
commit | edd1967d0c957ab48836fe0cc0128d012c6b6c6c (patch) | |
tree | 0dff9e44d22a2396c142a7018e5bd673b236bb05 /gcc/stmt.c | |
parent | 448f456d7a9043f135f13ea300f8ac124906adfe (diff) | |
download | gcc-edd1967d0c957ab48836fe0cc0128d012c6b6c6c.zip gcc-edd1967d0c957ab48836fe0cc0128d012c6b6c6c.tar.gz gcc-edd1967d0c957ab48836fe0cc0128d012c6b6c6c.tar.bz2 |
re PR c/5609 (ICE on named operands in inline assembler)
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.
From-SVN: r49560
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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'; |