From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A0B8396EC84; Thu, 7 Jan 2021 13:05:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A0B8396EC84 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/83118] [8/9/10/11 Regression] Bad intrinsic assignment of class(*) array component of derived type Date: Thu, 07 Jan 2021 13:05:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 8.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 13:05:34 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D83118 --- Comment #43 from CVS Commits --- The releases/gcc-9 branch has been updated by Paul Thomas : https://gcc.gnu.org/g:1fa1430d1cfc4b373bfde9e3a749a5255a589643 commit r9-9159-g1fa1430d1cfc4b373bfde9e3a749a5255a589643 Author: Paul Thomas Date: Sat Dec 26 15:08:11 2020 +0000 Fix failures with -m32 and some memory leaks. 2020-12-23 Paul Thomas gcc/fortran PR fortran/83118 * trans-array.c (gfc_alloc_allocatable_for_assignment): Make sure that class expressions are captured for dummy arguments by use of gfc_get_class_from_gfc_expr otherwise the wrong vptr is used. * trans-expr.c (gfc_get_class_from_gfc_expr): New function. (gfc_get_class_from_expr): If a constant expression is encountered, return NULL_TREE; (gfc_trans_assignment_1): Deallocate rhs allocatable components after passing derived type function results to class lhs. * trans.h : Add prototype for gfc_get_class_from_gfc_expr. (cherry picked from commit 0175d45d14b1f9ebc4c15ea5bafcda655c37fc35)=