On 3/16/2021 5:32 AM, Nick Clifton via Gcc-patches wrote:
Hi Jan-Benedict,
With my re-started testing efforts, I've got another one for you I
guess (`./configure --target=v850-elf && make all-gcc`):
../.././gcc/config/v850/v850.c: In function ‘char*
construct_restore_jr(rtx)’:
../.././gcc/config/v850/v850.c:2260:22: error: ‘%s’ directive writing
up to 39 bytes into a region of size between 32 and 71
[-Werror=format-overflow=]
2260 | sprintf (buff, "movhi hi(%s), r0, r6\n\tmovea lo(%s),
r6, r6\n\tjmp r6",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2261 | name, name);
| ~~~~
I could not reproduce these in my local environment, but I suspect that
you are using a more recent version of gcc than me. The fix looks
obvious
however, so please could you try out the attached patch and let me know
if it resolves the problem ?
I suspect that construct_save_jarl has the same problem and the same
patch should fix it.
Jeff