From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6360 invoked by alias); 1 Oct 2013 21:13:43 -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 6289 invoked by uid 48); 1 Oct 2013 21:13:38 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58586] [OOP] ICE with derived type with a polymorphic allocatable component passed by value Date: Tue, 01 Oct 2013 21:13: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.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: keywords cf_known_to_fail 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: 2013-10/txt/msg00064.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58586 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-valid-code Known to fail| |4.7.3, 4.8.1, 4.9.0 --- Comment #1 from Tobias Burnus --- (The code compiles successfully with crayftn, pgf95 and ifort.) (In reply to Vladimir Fuka from comment #0) > 0x5b19b0 structure_alloc_comps > ../../gcc-4.8-20130425/gcc/fortran/trans-array.c:7440 That's for der_type->name == "b" and debug_tree(decl) gives: ts.type == BT_DERIVED || e->ts.type == BT_CLASS) && e->ts.u.derived->attr.alloc_comp && !(e->symtree && e->symtree->n.sym->attr.pointer) && (e->expr_type != EXPR_VARIABLE && !e->rank)) { ... tmp = gfc_deallocate_alloc_comp (e->ts.u.derived, tmp, parm_rank); gfc_add_expr_to_block (&se->post, tmp); } which shows that a temporary is required.