From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32117 invoked by alias); 20 Nov 2013 02:30:52 -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 32071 invoked by uid 48); 20 Nov 2013 02:30:47 -0000 From: "juergen.reuter at desy dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/59198] New: ICE on cyclically dependent polymorphic types Date: Wed, 20 Nov 2013 02:30: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: juergen.reuter at desy dot de 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 bug_severity priority component assigned_to reporter attachments.created 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-11/txt/msg01939.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59198 Bug ID: 59198 Summary: ICE on cyclically dependent polymorphic types Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: juergen.reuter at desy dot de Created attachment 31254 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31254&action=edit Code triggering the ICE Triggers ICE with gfortran 4.9.0 v204344. It compiles with gfortran 4.6.3 (but in our setup produces seg faults in the final code), ICE is present in 4.6.4, 4.7.3, 4.8.1. This is the code O(60) lines, also attached: module decays abstract interface function obs_unary_int () end function obs_unary_int end interface type, abstract :: any_config_t contains procedure (any_config_final), deferred :: final end type any_config_t type :: decay_term_t type(unstable_t), dimension(:), pointer :: unstable_product => null () end type decay_term_t type, abstract :: decay_gen_t type(decay_term_t), dimension(:), allocatable :: term procedure(obs_unary_int), nopass, pointer :: obs1_int => null () end type decay_gen_t type, extends (decay_gen_t) :: decay_root_t contains procedure :: final => decay_root_final end type decay_root_t type, abstract :: rng_t end type rng_t type, extends (decay_gen_t) :: decay_t class(rng_t), allocatable :: rng contains procedure :: final => decay_final end type decay_t type, extends (any_config_t) :: unstable_config_t contains procedure :: final => unstable_config_final end type unstable_config_t type :: unstable_t type(unstable_config_t), pointer :: config => null () type(decay_t), dimension(:), allocatable :: decay end type unstable_t interface subroutine any_config_final (object) import class(any_config_t), intent(inout) :: object end subroutine any_config_final end interface contains subroutine decay_root_final (object) class(decay_root_t), intent(inout) :: object end subroutine decay_root_final recursive subroutine decay_final (object) class(decay_t), intent(inout) :: object end subroutine decay_final recursive subroutine unstable_config_final (object) class(unstable_config_t), intent(inout) :: object end subroutine unstable_config_final end module decays