From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32016 invoked by alias); 4 Apr 2013 21:24:19 -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 31973 invoked by uid 48); 4 Apr 2013 21:24:13 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56845] [OOP] _vptr not set to declared type for CLASS + SAVE Date: Thu, 04 Apr 2013 21:24: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-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed Ever Confirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-04/txt/msg00455.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56845 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-04-04 Ever Confirmed|0 |1 --- Comment #3 from janus at gcc dot gnu.org 2013-04-04 21:24:12 UTC --- (In reply to comment #2) > (In reply to comment #1) > > Also there is a piece of code in gfc_trans_deferred_vars (trans-decl.c) which > > claims to do exactly this (AFAICS). No idea why it is not in effect. > > That's easily answered: Because it is guarded by an "if (!sym->attr.save)". Also it can not be used for SAVEd variables, because it would set the vptr on each call of the subroutine (which is of course not what we want).