gas: arm -mwarn-syms duplicates
authorAlan Modra <amodra@gmail.com>
Thu, 7 Jul 2022 12:11:17 +0000 (21:41 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 9 Jul 2022 11:30:09 +0000 (21:00 +0930)
commitd3be5dab558ab91789800a03fc2c1dc3c529eaf5
treeedf29f13752e5285589f10ce89a26d6740c760ea
parentb95830931fc30c85bd3ca3d00a8578e03c39ba7e
gas: arm -mwarn-syms duplicates

arm gas is only supposed to warn once per symbol for -mwarn-syms, but
doesn't because the str_hash_find added with commit 629310abec88
always returns NULL.  That's so because the str_hash_insert inserts a
NULL value for the key,value pair.  Let str_hash_insert do the job
instead.

* config/tc-arm.c (arm_tc_equal_in_insn): Correct already_warned
logic.
* testsuite/gas/arm/pr18347.s: Modify to generate duplicate
warning without this patch.
gas/config/tc-arm.c
gas/testsuite/gas/arm/pr18347.s