From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27974 invoked by alias); 20 Nov 2013 14:40:02 -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 27770 invoked by uid 48); 20 Nov 2013 14:39:57 -0000 From: "janus 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: Wed, 20 Nov 2013 14:40: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: janus 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 short_desc 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: 2013-11/txt/msg02027.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59198 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2013-11-20 CC| |janus at gcc dot gnu.org Summary|ICE on cyclically dependent |[4.7/4.8/4.9 Regression] |polymorphic types |ICE on cyclically dependent | |polymorphic types Ever confirmed|0 |1 --- Comment #1 from janus at gcc dot gnu.org --- I tried to reduce this as far as I could, with the following result: module decays implicit none type :: decay_term_t type(unstable_t), pointer :: unstable_product end type type :: decay_gen_t type(decay_term_t), allocatable :: term procedure(), nopass, pointer :: obs1_int end type type :: rng_t end type type, extends (decay_gen_t) :: decay_t class(rng_t), allocatable :: rng end type type :: unstable_t type(decay_t) :: decay end type class(decay_t), pointer :: object end The ICE I get with trunk is: c0.f90:18:0: internal compiler error: in tree_low_cst, at tree.h:3667 class(rng_t), allocatable :: rng ^ 0xb0735b tree_low_cst /home/jweil/gcc49/trunk/gcc/tree.h:3667 0xb0735b output_constructor_array_range /home/jweil/gcc49/trunk/gcc/varasm.c:4836 0xb0735b output_constructor /home/jweil/gcc49/trunk/gcc/varasm.c:5210 0xb066fa assemble_variable(tree_node*, int, int, int) /home/jweil/gcc49/trunk/gcc/varasm.c:2125 0xb081f5 varpool_assemble_decl(varpool_node*) /home/jweil/gcc49/trunk/gcc/varpool.c:454 0x6cff87 output_in_order /home/jweil/gcc49/trunk/gcc/cgraphunit.c:1955 0x6cff87 compile() /home/jweil/gcc49/trunk/gcc/cgraphunit.c:2194 0x6d01f9 finalize_compilation_unit() /home/jweil/gcc49/trunk/gcc/cgraphunit.c:2276 0x831204 write_global_declarations() /home/jweil/gcc49/trunk/gcc/langhooks.c:323 Similar things happen 4.8 and 4.7. However, I can not reproduce the ICE with 4.6.4: $ gfortran-4.6 -v Using built-in specs. COLLECT_GCC=gfortran-4.6 COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-3ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-3ubuntu1)