From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12056 invoked by alias); 25 Feb 2014 09:31:59 -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 11989 invoked by uid 48); 25 Feb 2014 09:31:56 -0000 From: "pault at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59198] [4.7/4.8/4.9 Regression] ICE on cyclically dependent polymorphic types Date: Tue, 25 Feb 2014 09:31: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.9.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pault at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 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-02/txt/msg02497.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59198 --- Comment #11 from Paul Thomas --- A correct version of the patch of comment#6 to varasm.c is: Index: gcc/varasm.c =================================================================== *** gcc/varasm.c (revision 208048) --- gcc/varasm.c (working copy) *************** output_constructor_regular_field (oc_loc *** 4939,4944 **** --- 4939,4946 ---- better be last. */ gcc_assert (!fieldsize || !DECL_CHAIN (local->field)); } + else if (DECL_SIZE_UNIT (local->field) == NULL_TREE) + fieldsize = int_size_in_bytes (TREE_TYPE (local->field)); else fieldsize = tree_to_uhwi (DECL_SIZE_UNIT (local->field)); } Clearly, this is bomb-proof and so regtesting proceeds without problem for gcc and gfortran. It now remains to understand how structure fields can be built with type size information but with the decl comon information missing! ie. it should be possible to render the above unnecessary. Cheers Paul