clang catches this error and another like it on line 6320.
elfnn-loongarch.c:6357:35: error: overlapping comparisons always evaluate to true [-Werror,-Wtautological-overlap-compare]
6357 | && (r_type != R_LARCH_CALL36 || r_type != R_LARCH_CALL30))
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
* elfnn-loongarch.c (loongarch_elf_relax_section): Correct tests
for R_LARCH_CALL36 and_LARCH_CALL30.
+ r_symndx;
if ((ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC
- && (r_type != R_LARCH_CALL36 || r_type != R_LARCH_CALL30))
+ && (r_type != R_LARCH_CALL36 && r_type != R_LARCH_CALL30))
|| sym->st_shndx == SHN_ABS)
continue;
is not set yet. */
if (h != NULL
&& ((h->type == STT_GNU_IFUNC
- && (r_type != R_LARCH_CALL36 || r_type != R_LARCH_CALL30))
+ && (r_type != R_LARCH_CALL36 && r_type != R_LARCH_CALL30))
|| bfd_is_abs_section (h->root.u.def.section)
|| h->start_stop))
continue;