From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 131028 invoked by alias); 12 Oct 2015 14:06:00 -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 130961 invoked by uid 48); 12 Oct 2015 14:05:52 -0000 From: "mandrew9 at vt dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/67933] New: [4.9/5/Trunk Regression] ICE for array of a derived type with allocatable class in derived type object Date: Mon, 12 Oct 2015 14:06: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: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mandrew9 at vt dot edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone 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: 2015-10/txt/msg00885.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67933 Bug ID: 67933 Summary: [4.9/5/Trunk Regression] ICE for array of a derived type with allocatable class in derived type object Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: mandrew9 at vt dot edu Target Milestone: --- Created attachment 36482 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36482&action=edit small test case (source code) Description: Create a derived type object (list_t) that contains an array of a derived type (wrapper_t). This derived type (wrapper_t) contains an allocatable class (class_t). Whenever the object is referenced (as in Method), an ICE is thrown. Replacing the allocatable class in the derived type (wrapper_t) with an allocatable derived type or primitive type allows the module to compile. test_mod.f95 (Also attached): ======================================== module test_mod implicit none type :: class_t end type class_t type :: wrapper_t class(class_t), allocatable :: class_var ! type(class_t), allocatable :: class_var ! integer, allocatable :: class_id end type wrapper_t type :: list_t type(wrapper_t) :: classes(10) contains procedure :: Method end type list_t contains subroutine Method(this) class(list_t) :: this contains ! Do stuff end subroutine Method end module test_mod ======================================== Compiler: gcc version 4.9.3/5/Trunk System: x86_64-redhat-linux ======================================== Command line: gfortran test_mod.f95 Output (with gcc 6.0.0 20151009 (experimental)): test_mod.f95:23:0: end module test_mod 1 internal compiler error: in gfc_conv_expr_descriptor, at fortran/trans-array.c:6684 0x6aabeb gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../../packages/gcc_svn/gcc/fortran/trans-array.c:6684 0x6cf613 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*) ../../../packages/gcc_svn/gcc/fortran/trans-expr.c:7854 0x6cfd1e gfc_reset_vptr(stmtblock_t*, gfc_expr*) ../../../packages/gcc_svn/gcc/fortran/trans-expr.c:360 0x6fc495 gfc_trans_deallocate(gfc_code*) ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:6070 0x698937 trans_code ../../../packages/gcc_svn/gcc/fortran/trans.c:1802 0x6f1f63 gfc_trans_if_1 ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1106 0x6f821a gfc_trans_if(gfc_code*) ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1137 0x698a27 trans_code ../../../packages/gcc_svn/gcc/fortran/trans.c:1740 0x6f9611 gfc_trans_simple_do ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1671 0x6f9611 gfc_trans_do(gfc_code*, tree_node*) ../../../packages/gcc_svn/gcc/fortran/trans-stmt.c:1834 0x6989fa trans_code ../../../packages/gcc_svn/gcc/fortran/trans.c:1752 0x6bb963 gfc_generate_function_code(gfc_namespace*) ../../../packages/gcc_svn/gcc/fortran/trans-decl.c:5900 0x69bcc1 gfc_generate_module_code(gfc_namespace*) ../../../packages/gcc_svn/gcc/fortran/trans.c:2014 0x65554d translate_all_program_units ../../../packages/gcc_svn/gcc/fortran/parse.c:5533 0x65554d gfc_parse_file() ../../../packages/gcc_svn/gcc/fortran/parse.c:5752 0x695cf2 gfc_be_parse_file ../../../packages/gcc_svn/gcc/fortran/f95-lang.c:209 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. ======================================== Configured with: ../../packages/gcc_svn/configure --prefix=/l/mandrew9/Software/installs/gcc/gcc-trunk --with-cpu=generic --build=x86_64-redhat-linux --enable-threads=posix --enable-checking=release --enable-languages=fortran,c,c++ --disable-multilib