From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 66DF43858401; Wed, 28 Jun 2023 11:39:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66DF43858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687952354; bh=qGFr/zTud1P1wOGDjnLTaDHL/DHf83+N7joMJ0qGBbc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=eo13+LWBTwcCR+X1a/yQh5jRWsIM9E2hrVgwy90oLPNoy9Pwx/j9EMocUj4VQGO9v 599xFKfn8SMyhwMY7VuE5ApxWXBUitnuF/PdcAe9ibIEXTT/ubUWgS06/VyMQyau1r IZRiwoaY751rtCHrxJDHpB+teWm2JkwigPviJN4Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/49213] [OOP] gfortran rejects structure constructor expression Date: Wed, 28 Jun 2023 11:39:12 +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.1.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: major X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D49213 --- Comment #36 from CVS Commits --- The master branch has been updated by Paul Thomas : https://gcc.gnu.org/g:3521768e8e3c448052c5bd3e8fde412e9cf5d70f commit r14-2160-g3521768e8e3c448052c5bd3e8fde412e9cf5d70f Author: Paul Thomas Date: Wed Jun 28 12:38:58 2023 +0100 Fortran: Enable class expressions in structure constructors [PR49213] 2023-06-28 Paul Thomas gcc/fortran PR fortran/49213 * expr.cc (gfc_is_ptr_fcn): Remove reference to class_pointer. * resolve.cc (resolve_assoc_var): Call gfc_is_ptr_fcn to allow associate names with pointer function targets to be used in variable definition context. * trans-decl.cc (get_symbol_decl): Remove extraneous line. * trans-expr.cc (alloc_scalar_allocatable_subcomponent): Obtain size of intrinsic and character expressions. (gfc_trans_subcomponent_assign): Expand assignment to class components to include intrinsic and character expressions. gcc/testsuite/ PR fortran/49213 * gfortran.dg/pr49213.f90 : New test=