From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13794 invoked by alias); 3 Jan 2013 16:54:46 -0000 Received: (qmail 12819 invoked by uid 48); 3 Jan 2013 16:54:06 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55763] Issues with some simpler CLASS(*) programs Date: Thu, 03 Jan 2013 16:54: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: ice-on-valid-code, rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: pault at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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 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 X-SW-Source: 2013-01/txt/msg00215.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55763 --- Comment #15 from Tobias Burnus 2013-01-03 16:54:03 UTC --- (In reply to comment #14) > type(t), target :: x > class(*), pointer :: ptr2 => x TODO: Check whether that would be also valid if "x" is not SAVE (here it is as "x" is in the main program) and whether one should reject a pointer as data-target. (Cf. also PR51076, PR45290 and PR50410 comment 9.) (In reply to comment #14) > The following (currently used in gfortran.dg/unlimited_polymorphic_3.f03) is > invalid: > class(*), pointer :: ptr2 => null(x) Note that ptr => null(x) is valid. In any case same_type_as (ptr,x) will be .false. as "ptr" has the declared type (which doesn't exist) and "x" has a declared type. Presumably, even same_type_as(ptr,ptr) would be false?!?