From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D117D3858D1E; Sat, 27 Apr 2024 14:50:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D117D3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714229415; bh=RejZU0oh9E8snynHas3gKPI6N/im5yRZXLLHqVwnXBM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gAYBByiX3VD+8Gjo5aRBg+3v5ex3fKkEHk7Z0ldrVHMPhrNftsK+UJXJUEMz2QiZQ 3R+jITiasmlQFEnG9o96d8KHrx8fclzfC48JuQPdpWZSWEkJHEebBCy9XYLBzQXq74 Ax0sKjXTfDc2+0hF3oYfVAGSfdqQEI4xqOkIWUdw= From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114859] [14/15 Regression] Seeing new segmentation fault in same_type_as since r14-9752 Date: Sat, 27 Apr 2024 14:50:14 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to attachments.created 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=3D114859 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gn= u.org --- Comment #11 from Paul Thomas --- Created attachment 58054 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D58054&action=3Dedit Fix for this PR Hi Orion and Jakub, Mea culpa, mea maxima culpa! I had totally overlooked the use of gfc_trans_class_init_assign for application of 'mold' in class allocation. subroutine restore_smoothers(level,save1, save2,info) ....snip.... if (allocated(level%sm)) then if (info =3D=3D 0) call level%sm%free(info) if (info =3D=3D 0) deallocate(level%sm,stat=3Dinfo) end if if (allocated(save1)) then if (info =3D=3D 0) allocate(level%sm,mold=3Dsave1,stat=3Dinfo) ! Rep= eats below... if (info =3D=3D 0) call save1%clone_settings(level%sm,info) end if ....snip.... the attached patch fixes both this problem and respects the standard for the default initialization of INTENT(OUT) dummies. It regtests fine. A suitable testcase is on its way. @Jakub, As per your message of Fri Apr 26 11:03:31, I hope that the patch c= an find its way to the 14.1 release candidate. Regards Paul=