https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65571

            Bug ID: 65571
           Summary: [4.8/4.9 Regression] ICE for array of a derived type
                    with allocatable array in derived type object
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mandrew9 at vt dot edu

Created attachment 35140
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35140&action=edit
small test case (source code)

Description: 
Create a derived type object (test_t) that contains an array of a derived type
(arraylist_t). This derived type (arraylist_t) contains an allocatable array.
Whenever the object is referenced (as in test_routine), an ICE is thrown.
Replacing the allocatable array in the derived type (arraylist_t) with an
explicit shape array (as shown below) allows the module to compile.

test_mod.f95 (Also attached):
========================================
module test_mod
  implicit none

  type :: arraylist_t
    real, allocatable :: array(:)
!    real              :: array(5)
  end type arraylist_t

  type :: test_t
    type(arraylist_t) :: test_list(3)
  contains
    procedure :: test_routine
  end type test_t

contains

  subroutine test_routine(test_var)
    class(test_t), intent(in) :: test_var
  continue
    ! Do stuff
  end subroutine test_routine
end module test_mod
========================================
Compiler:     gcc version 4.9.2 (Ubuntu 4.9.2-0ubuntu1~14.04)
System:       Ubuntu 14.04
========================================
Command line: gfortran test_mod.f95
Output:
test_mod.f95: In function ‘__final_test_mod_Test_t’:
test_mod.f95:22:0: internal compiler error: in gfc_conv_descriptor_data_get, at
fortran/trans-array.c:145
 end module test_mod
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
========================================
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.9.2-0ubuntu1~14.04' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu

Reply via email to