From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30330 invoked by alias); 25 Oct 2012 14:52:04 -0000 Received: (qmail 30048 invoked by uid 48); 25 Oct 2012 14:51:45 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/55057] [OOP] wrong result with abstract type Date: Thu, 25 Oct 2012 14:52: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: 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: 2012-10/txt/msg02354.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55057 --- Comment #3 from janus at gcc dot gnu.org 2012-10-25 14:51:44 UTC --- Here is a reduced test case, which is not usable as a runtime test, but shows the wrong dump: module m implicit none type :: t1 end type type :: t2 class(t1), allocatable :: work(:) end type contains subroutine alt(x) class(t1), intent(in) :: x end subroutine subroutine sub1(a) type(t2) :: a call alt(a%work(1)) end subroutine subroutine sub2(b) class(t2) :: b call alt(b%work(1)) end subroutine end module The dump of 'sub2' is wrong in 4.8, while 'sub1' is ok. With 4.7, both are wrong.