https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97586
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> --- So the _bfd_safe_read_leb128.constprop removes the first unused argument: bfd_vma _bfd_safe_read_leb128 (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *data, unsigned int *length_return, bfd_boolean sign, const bfd_byte * const end) { bfd_vma result = 0; unsigned int num_read = 0; unsigned int shift = 0; unsigned char byte = 0; while (data < end) { byte = bfd_get_8 (abfd, data); data++; num_read++; result |= ((bfd_vma) (byte & 0x7f)) << shift; shift += 7; if ((byte & 0x80) == 0) break; } if (length_return != NULL) *length_return = num_read; if (sign && (shift < 8 * sizeof (result)) && (byte & 0x40)) result |= -((bfd_vma) 1 << shift); return result; } But the analysis is bogus: ipa-modref: call to _bfd_safe_read_leb128.constprop/17919 does not clobber ref: bytes_read alias sets: 7->7 The &bytes_read is always modified in the function (if it's non-null).