diff options
author | Søren Sandmann <ssp@redhat.com> | 2013-12-28 15:55:58 -0500 |
---|---|---|
committer | Søren Sandmann <ssp@redhat.com> | 2013-12-28 15:58:10 -0500 |
commit | d2c9162f3fcccf9196955fc6e29053bf010e5765 (patch) | |
tree | 8167f796637e39de2233f959cc221dc8b3d14aab | |
parent | c041ad7baddb3a31aa48946045c1aa68de93864d (diff) |
-rw-r--r-- | simplex86.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/simplex86.c b/simplex86.c index c1ced11..b891ab7 100644 --- a/simplex86.c +++ b/simplex86.c @@ -1252,8 +1252,17 @@ gather_labels (array_t *a) if (label->type == LABEL) { uint32_t idx = hash (label->name); - while (hash_table[idx & mask]) - idx++; + annotation_t *existing; + + while ((existing = hash_table[idx & mask])) + { + if (strcmp (existing->name, label->name) == 0) + { + printf ("Duplicate label %s\n", label->name); + abort (); + } + idx++; + } hash_table[idx & mask] = label; } |