public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-4815] Fortran: Revert explicit memcpy in gfc_get_typebound_proc
Date: Sun, 31 Oct 2021 22:35:35 +0000 (GMT)	[thread overview]
Message-ID: <20211031223535.537463858422@sourceware.org> (raw)

https://gcc.gnu.org/g:6ea6c05a8d4354b25c6c18c1b60e1f5a06d25f66

commit r12-4815-g6ea6c05a8d4354b25c6c18c1b60e1f5a06d25f66
Author: Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
Date:   Sun Oct 31 23:21:36 2021 +0100

    Fortran: Revert explicit memcpy in gfc_get_typebound_proc
    
    This reverts the hunk to gfc_get_typebound_proc from
    7883a7f07c1ad9c8aaccc5bbd96e0ae1fa230c89
    
    gcc/fortran/ChangeLog:
    
            * symbol.c (gfc_get_typebound_proc): Revert memcpy.

Diff:
---
 gcc/fortran/symbol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c
index 34c0ba2fac4..d6f53f4ff20 100644
--- a/gcc/fortran/symbol.c
+++ b/gcc/fortran/symbol.c
@@ -5073,7 +5073,7 @@ gfc_get_typebound_proc (gfc_typebound_proc *tb0)
 
   result = XCNEW (gfc_typebound_proc);
   if (tb0)
-    memcpy (result, tb0, sizeof (gfc_typebound_proc));
+    *result = *tb0;
   result->error = 1;
 
   latest_undo_chgset->tbps.safe_push (result);


                 reply	other threads:[~2021-10-31 22:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211031223535.537463858422@sourceware.org \
    --to=aldot@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).