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

            Bug ID: 86242
           Summary: [F03] ICE for derived type with allocatable class
                    component
           Product: gcc
           Version: 8.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: c...@mnet-mail.de
  Target Milestone: ---

The following Fortran 2003 code (which compiles with flang 6.0,
pgfortran 17.10, and ifort 19.0.0.070 Beta) generates an internal compiler
error (ICE) with gfortran 8.0.1:

$ cat test.F90 
module test

   implicit none 

   private
   public :: tester

   type :: wrapper
      integer(4) :: n
   end type wrapper

   type :: output
      real(8) :: dummy
   end type output

   type :: tester
      class(wrapper),  allocatable :: wrap
      procedure(proc1), pointer :: ptr => null()
   end type tester

   abstract interface
      function proc1(self) result(uc)
         import :: tester, output
         class(tester), intent(in) :: self 
         class(output), allocatable :: uc
      end function proc1
   end interface

end module test

$ gfortran-8 -c test.F90
test.F90:29:0:

 end module test

internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-8/README.Bugs> for instructions.

Gfortran version output is:
$ gfortran-8 -v
Using built-in specs.
COLLECT_GCC=gfortran-8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/8/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
8-20180424-0ubuntu1~16.04.1'
--with-bugurl=file:///usr/share/doc/gcc-8/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --with-as=/usr/bin/x86_64-linux-gnu-as
--with-ld=/usr/bin/x86_64-linux-gnu-ld --program-suffix=-8
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib
--with-target-system-zlib --enable-objc-gc=auto --enable-multiarch
--disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none --without-cuda-driver
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 8.0.1 20180424 (experimental) [trunk revision 259590] (Ubuntu
8-20180424-0ubuntu1~16.04.1)

Reply via email to