From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id 247333858422; Sun, 31 Oct 2021 22:35:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 247333858422 Received: by mail-wm1-x335.google.com with SMTP id g191-20020a1c9dc8000000b0032fbf912885so6601530wme.4; Sun, 31 Oct 2021 15:35:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5lthnZDBycnkevt+6LZReJHKJokZQhIv+Zz4WCt9t5k=; b=hnfKCnDLii2mbIVlvhZfWZt6F92RmWoVk1DFfsAxZhLUNEO1kLS6vss+9WEEY+w/Wj L/FdzybgbJHA/ekKkdiMn/LaQjlBoZMX3ey1DVv7BVbbQAULTGEmIdC6qyQ9SKKxAA13 7kQAt9iUdaKiy0Sz3Gx/vxXxDRLKo0SxxxuFhzyXPQ/Pl9BW3uh+JCWySChhVAdM/yoh pwnIJhAqSC8p52qwem56S8VBqS5ObP/W7nqW2kkQIdeRrD9b9TmpvkCncoiTFz5TiRzd D8ngyCfAV/yCbCqubn51Cia6gt3HyeKlx0TPLJFjMIuNa/UPLt1DcBmjNRUbXpxu8IGz cFEQ== X-Gm-Message-State: AOAM533CmtNXeU+5agu9XObkRctPgIfpYiNz96jlfgFyMBu+Wev+Pdp8 OhCpmduODTj60vaCBtBYyi0= X-Google-Smtp-Source: ABdhPJwS4S5gd9a8ISA11g8h3AI5cEzllg+1HeYzyL2WnXFnrl1hS8HPmPj+8EcV9W+KpXhGGWTD8A== X-Received: by 2002:a1c:4d08:: with SMTP id o8mr34970422wmh.35.1635719743240; Sun, 31 Oct 2021 15:35:43 -0700 (PDT) Received: from nbbrfq (dynamic-2bq7di4u2lfl4qjka9-pd01.res.v6.highway.a1.net. [2001:871:227:33a8:f6a3:c58c:7641:e771]) by smtp.gmail.com with ESMTPSA id s3sm12136237wrm.40.2021.10.31.15.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Oct 2021 15:35:43 -0700 (PDT) Date: Sun, 31 Oct 2021 23:35:40 +0100 From: Bernhard Reutner-Fischer To: Harald Anlauf via Gcc-patches Cc: rep.dot.nop@gmail.com, Harald Anlauf , fortran@gcc.gnu.org, Jerry D Subject: Re: [PATCH,FORTRAN 28/29] Free type-bound procedure structs Message-ID: <20211031233540.3b4920fa@nbbrfq> In-Reply-To: <20211029220907.04654d89@nbbrfq> References: <20180905145732.404-29-rep.dot.nop@gmail.com> <20211029020551.11a62076@nbbrfq> <20211029220907.04654d89@nbbrfq> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Oct 2021 22:35:46 -0000 On Fri, 29 Oct 2021 22:09:07 +0200 Bernhard Reutner-Fischer wrote: > On Fri, 29 Oct 2021 21:36:26 +0200 > Harald Anlauf via Gcc-patches 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,