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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Using valgrind on the testcase makes the problem easier to trigger.

> valgrind ./class_assign_4.exe 
==4208== Memcheck, a memory error detector
==4208== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==4208== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==4208== Command: ./class_assign_4.exe
==4208== 
==4208== Invalid write of size 8
==4208==    at 0x4C35863: memmove (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4208==    by 0x4076A7: test_t1_ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409DEF: MAIN__ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409E2B: main (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==  Address 0x5e47bd8 is 8 bytes inside a block of size 12 alloc'd
==4208==    at 0x4C308BF: realloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4208==    by 0x405C3C: test_t1_ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409DEF: MAIN__ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409E2B: main (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208== 
==4208== Invalid read of size 4
==4208==    at 0x405048: check_t1.2 (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x407822: test_t1_ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409DEF: MAIN__ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409E2B: main (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==  Address 0x5e47be0 is 4 bytes after a block of size 12 alloc'd
==4208==    at 0x4C308BF: realloc (in
/usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==4208==    by 0x405C3C: test_t1_ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
==4208==    by 0x409DEF: MAIN__ (in
/home/rguenther/obj-gcc10-g/gcc/class_assign_4.exe)
...

Reply via email to