loongarch64 build failure on 32-bit host
authorAlan Modra <amodra@gmail.com>
Tue, 14 Dec 2021 11:36:29 +0000 (22:06 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 14 Dec 2021 22:50:59 +0000 (09:20 +1030)
commita078dd9ce81537fa01356c12283bf14f29b36439
tree8244ed0197edab1fae8647c8ce2cb1da356042bb
parenteda0ddeb26a117660f3c0f54572053117641c2c3
loongarch64 build failure on 32-bit host

gas/config/tc-loongarch.c: In function â€˜loongarch_args_parser_can_match_arg_helper’:
gas/config/tc-loongarch.c:661:13: error: cast from pointer to integer of different size [-Werror=pointer
-to-int-cast]
  661 |       imm = (offsetT) str_hash_find (r_htab, arg);
      |             ^

Cast it to the correct size int, relying on normal integer promotions
if offsetT is larger than a pointer.

* config/tc-loongarch.c (loongarch_args_parser_can_match_arg_helper):
Cast return from str_hash_find to intptr_t, not offsetT.
gas/config/tc-loongarch.c