binutils-gdb/sim/d10v
Luis Machado e7e40cedbb Fix build failure in d10v sim
While building all targets on Ubuntu 20.04/aarch64, I ran into the following
build error:

In file included from /usr/include/string.h:495,
                 from ../../bfd/bfd.h:48,
                 from ../../../../repos/binutils-gdb/sim/d10v/interp.c:4:
In function memset,
    inlined from sim_create_inferior at ../../../../repos/binutils-gdb/sim/d10v/interp.c:1146:3:
/usr/include/aarch64-linux-gnu/bits/string_fortified.h:71:10: error: __builtin_memset offset [33, 616] from the object at State is out of the bounds of referenced subobject regs with type reg_t[16] {aka short unsigned int[16]} at offset 0 [-Werror=array-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [Makefile:558: interp.o] Error 1

The following patch fixes this.

sim/ChangeLog:

2021-05-12  Luis Machado  <luis.machado@linaro.org>

	* d10v/interp.c (sim_create_inferior): Fix memset call.
2021-05-12 00:57:46 -03:00
..
aclocal.m4 sim: enable hardware support by default 2021-04-26 22:30:55 -04:00
ChangeLog sim: add support for build-time ar & ranlib 2021-05-04 08:22:07 -04:00
config.in sim: nrun: add local strsignal prototype 2021-05-01 16:37:39 -04:00
configure sim: add support for build-time ar & ranlib 2021-05-04 08:22:07 -04:00
configure.ac sim: d10v: fix build warnings 2021-04-18 21:16:03 -04:00
d10v_sim.h sim: clean up bfd_vma printing 2021-05-04 08:13:45 -04:00
endian.c sim: d10v: gut endian logic 2016-01-04 05:04:04 -05:00
gencode.c sim: d10v: push down sd/cpu vars 2015-11-15 20:47:03 -05:00
interp.c Fix build failure in d10v sim 2021-05-12 00:57:46 -03:00
Makefile.in Remove and modernize dependencies in sim 2021-04-22 19:51:55 -06:00
sim-main.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
simops.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00