summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-13 09:29:03 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2002-04-13 09:29:03 +0000
commite3189f725522a4d9f31513fe558cd8b1b1dc45d4 (patch)
tree7ce196bd09b2829aee78182cc4a87bbe0cf3c046 /gcc/stmt.c
parent12543bbd3ea56921c2ed323d04ce266195eaecfb (diff)
downloadgcc-e3189f725522a4d9f31513fe558cd8b1b1dc45d4.tar.gz
* stmt.c (check_unique_operand_names): Expect operand names to
be strings rather than identifiers. Use simple_cst_equal to compare them. (resolve_operand_name_1): Make same identifier to string change here. * c-parse.in (asm_operand): Convert a named operand into a string. * cp/parse.y (asm_operand): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52269 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 4f0cb179547..32a1541cb05 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2034,7 +2034,7 @@ check_unique_operand_names (outputs, inputs)
continue;
for (j = TREE_CHAIN (i); j ; j = TREE_CHAIN (j))
- if (i_name == TREE_PURPOSE (TREE_PURPOSE (j)))
+ if (simple_cst_equal (i_name, TREE_PURPOSE (TREE_PURPOSE (j))))
goto failure;
}
@@ -2045,10 +2045,10 @@ check_unique_operand_names (outputs, inputs)
continue;
for (j = TREE_CHAIN (i); j ; j = TREE_CHAIN (j))
- if (i_name == TREE_PURPOSE (TREE_PURPOSE (j)))
+ if (simple_cst_equal (i_name, TREE_PURPOSE (TREE_PURPOSE (j))))
goto failure;
for (j = outputs; j ; j = TREE_CHAIN (j))
- if (i_name == TREE_PURPOSE (TREE_PURPOSE (j)))
+ if (simple_cst_equal (i_name, TREE_PURPOSE (TREE_PURPOSE (j))))
goto failure;
}
@@ -2056,7 +2056,7 @@ check_unique_operand_names (outputs, inputs)
failure:
error ("duplicate asm operand name '%s'",
- IDENTIFIER_POINTER (TREE_PURPOSE (TREE_PURPOSE (i))));
+ TREE_STRING_POINTER (TREE_PURPOSE (TREE_PURPOSE (i))));
return false;
}
@@ -2150,20 +2150,20 @@ resolve_operand_name_1 (p, outputs, inputs)
/* Resolve the name to a number. */
for (op = 0, t = outputs; t ; t = TREE_CHAIN (t), op++)
{
- tree id = TREE_PURPOSE (TREE_PURPOSE (t));
- if (id)
+ tree name = TREE_PURPOSE (TREE_PURPOSE (t));
+ if (name)
{
- const char *c = IDENTIFIER_POINTER (id);
+ const char *c = TREE_STRING_POINTER (name);
if (strncmp (c, p + 1, len) == 0 && c[len] == '\0')
goto found;
}
}
for (t = inputs; t ; t = TREE_CHAIN (t), op++)
{
- tree id = TREE_PURPOSE (TREE_PURPOSE (t));
- if (id)
+ tree name = TREE_PURPOSE (TREE_PURPOSE (t));
+ if (name)
{
- const char *c = IDENTIFIER_POINTER (id);
+ const char *c = TREE_STRING_POINTER (name);
if (strncmp (c, p + 1, len) == 0 && c[len] == '\0')
goto found;
}