From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4550 invoked by alias); 23 Jul 2013 08:03:30 -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 2108 invoked by uid 48); 23 Jul 2013 08:01:27 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57959] New: ICE with structure constructor with scalar allocatable components Date: Tue, 23 Jul 2013 08:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.9.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: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: 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-07/txt/msg01065.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57959 Bug ID: 57959 Summary: ICE with structure constructor with scalar allocatable components Product: gcc Version: 4.9.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Based on the array example in PR57957, which compiles. The following: type :: type1 real, allocatable :: anum end type type1 ... = type1(5.0) fails with: 0x7b3b5d fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:1952 0x5fb036 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool, bool) ../../gcc/fortran/trans-expr.c:6899 Full example: program main implicit none type :: type1 real, allocatable :: anum end type type1 type :: type2 type(type1) :: temp end type type2 block type(type1) :: uKnot type(type2) :: a uKnot = type1(5.0) a = type2(uKnot) end block end