From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 54597 invoked by alias); 22 Apr 2015 13:03:03 -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 54503 invoked by uid 48); 22 Apr 2015 13:02:59 -0000 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65841] Seg fault on intrinsic assignment to allocatable derived type with allocatable component Date: Wed, 22 Apr 2015 13:03: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: pault 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: bug_status cf_reconfirmed_on cc everconfirmed 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-04/txt/msg01900.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65841 Paul Thomas changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-04-22 CC| |pault at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Paul Thomas --- Confirmed type a real, allocatable :: f end type type b type(a), allocatable :: g end type type(b) c,d c%g=a(1.) d=c d%g%f = 2.0 ! This causes the segfault too end However, if I make c and d allocatable type a real, allocatable :: f end type type b type(a), allocatable :: g end type type(b), allocatable :: c, d ! Note allocatable now allocate (c) c%g = a (1.) d = c d = c end ... it does not segfault. Note both must be allocatable for this to work. This should be a clue but I still do not see what is wrong with the code produced for the segfaulting cases. More staring at it tonight! Thanks for the report Paul