From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14944 invoked by alias); 12 Jan 2014 21:56:39 -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 14882 invoked by uid 48); 12 Jan 2014 21:56:36 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59781] [4.9 Regression] [F03] Incorrect initialisation of derived type Date: Sun, 12 Jan 2014 21:56: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: 4.8.2 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-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: 2014-01/txt/msg01303.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59781 --- Comment #2 from janus at gcc dot gnu.org --- Here is a reduced test case of comment 0, which shows the wrong dump with all gfortran versions I tried (4.4, 4.6, 4.7, 4.8 and trunk): module dSFMT_interface use, intrinsic :: iso_c_binding implicit none type dSFMT_t type(c_ptr) :: state = c_null_ptr real(c_double), allocatable :: store(:) end type end module use dSFMT_interface implicit none contains subroutine dSFMT_init(rng) type(dSFMT_t) :: rng end subroutine subroutine test_rng() type(dSFMT_t) :: rng call dSFMT_init(rng) end subroutine end It is very similar to comment 1, just that the derived type is defined in a separate module.