On Fri, 29 Oct 2021 22:09:07 +0200 Bernhard Reutner-Fischer <rep.dot....@gmail.com> wrote:
> On Fri, 29 Oct 2021 21:36:26 +0200 > Harald Anlauf via Gcc-patches <gcc-patc...@gcc.gnu.org> wrote: > > > Dear Bernhard, all, > > > > Am 29.10.21 um 02:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: > > > > >> diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c > > >> index 53c760a6c38..cde34c67482 100644 > > >> --- a/gcc/fortran/symbol.c > > >> +++ b/gcc/fortran/symbol.c > > > > >> @@ -5052,7 +5052,7 @@ gfc_get_typebound_proc (gfc_typebound_proc *tb0) > > >> > > >> result = XCNEW (gfc_typebound_proc); > > >> if (tb0) > > >> - *result = *tb0; > > >> + memcpy (result, tb0, sizeof (gfc_typebound_proc));; > > >> result->error = 1; > > >> > > >> latest_undo_chgset->tbps.safe_push (result); > > > > > > > > > > please forgive me, but frankly speaking, I don't like this change. > > > > It seems to serve no obvious purpose other than obfuscating the code > > and defeating the compiler's ability to detect type mismatches. > > mhm okay. > > > > I would not have OKed that part of the patch. I reverted this hunk. thanks,