https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97683

--- Comment #2 from sandra at gcc dot gnu.org ---
I'm pretty sure this is a gas bug.  I used git bisect to track it down to
binutils commit ae9d2233e61a98ff8dba56be10219aa5306ffc9a which caused gcc to
start passing --gdwarf-5 on the gas command line.  The DWARF-5 support was
present in gas before that and I think it's likely that's disagreeing with
something nios2-specific, perhaps mistakenly adding the size of the dwarf
directive data to the code length or something like that.  The differences in
the .s file generated by GCC for the test case between that binutils revision
with --gdwarf-5 and the one before it without that option don't seem to be
significant.

While working on this, I ran into another issue that is independently
preventing glibc from building:

In function '__rawmemchr',
    inlined from '__rawmemchr' at rawmemchr.c:27:1:
rawmemchr.c:40:12: error: 'memchr' specified bound 4294967295 exceeds maximum
object size 2147483647 [-Werror=stringop-overread]
   40 |     return memchr (s, c, (size_t)-1);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

I apologize that this is all in such bad shape -- the last time I tried doing
any testing on this target I ran into the glibc breakage Joseph mentioned, and
since then I've been assigned to a different project where my focus has been on
the gfortran front end instead.  :-S  I'll see if I can get some traction on
the gas bug, though.

Reply via email to