From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72512 invoked by alias); 28 Jul 2015 12:31:58 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 72415 invoked by uid 55); 28 Jul 2015 12:31:54 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/64921] [4.9/5/6 Regression] FAIL: gfortran.dg/class_allocate_18.f90 Date: Tue, 28 Jul 2015 12:31:00 -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: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-07/txt/msg02445.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64921 --- Comment #23 from rguenther at suse dot de --- On Tue, 28 Jul 2015, mikael at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64921 > > --- Comment #22 from Mikael Morin --- > (In reply to rguenther@suse.de from comment #21) > > Transfer.4 _is_ null in the case we segfault. So the guard us clearly wrong. > > > OK, let's try something else. > Are you positive transfer.4 is null? > I don't see anything that would make it so. >>From inspecting registers and the assembly. The debugger cannot get at the artificial decls. > If it is transfer.10 that is null, I can see the call to __final_main_T2 that > is suspicious; it seems to pass a descriptorless array to an argument expecting > a descriptor. > > Draft patch, seems to fix it > > diff --git a/gcc/fortran/class.c b/gcc/fortran/class.c > index 218973d..7a9e275 100644 > --- a/gcc/fortran/class.c > +++ b/gcc/fortran/class.c > @@ -1599,6 +1599,7 @@ generate_finalization_wrapper (gfc_symbol *derived, > gfc_namespace *ns, > final->ts.type = BT_INTEGER; > final->ts.kind = 4; > final->attr.artificial = 1; > + final->attr.always_explicit = 1; > final->attr.if_source = expr_null_wrapper ? IFSRC_IFBODY : IFSRC_DECL; > if (ns->proc_name->attr.flavor == FL_MODULE) > final->module = ns->proc_name->name; even better