Commit e8b87aac by Richard Kenner

(lookup_field): Change name comparison to match what field_decl_cmp

does.

From-SVN: r10138
parent c3fac866
...@@ -1138,8 +1138,6 @@ lookup_field (type, component, indirect) ...@@ -1138,8 +1138,6 @@ lookup_field (type, component, indirect)
top = TYPE_LANG_SPECIFIC (type)->len; top = TYPE_LANG_SPECIFIC (type)->len;
while (top - bot > 1) while (top - bot > 1)
{ {
HOST_WIDE_INT cmp;
half = (top - bot + 1) >> 1; half = (top - bot + 1) >> 1;
field = field_array[bot+half]; field = field_array[bot+half];
...@@ -1167,10 +1165,9 @@ lookup_field (type, component, indirect) ...@@ -1167,10 +1165,9 @@ lookup_field (type, component, indirect)
continue; continue;
} }
cmp = (HOST_WIDE_INT) DECL_NAME (field) - (HOST_WIDE_INT) component; if (DECL_NAME (field) == component)
if (cmp == 0)
break; break;
if (cmp < 0) if (DECL_NAME (field) < component)
bot += half; bot += half;
else else
top = bot + half; top = bot + half;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment