[Bug fortran/58356] New: ICE with finalization and type extension

abensonca at gmail dot com gcc-bugzilla@gcc.gnu.org
Sat Sep 7 20:20:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58356

            Bug ID: 58356
           Summary: ICE with finalization and type extension
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: abensonca at gmail dot com

The following causes an ICE in gfortran 4.9.0:

module ct
  type :: cfl
   contains
     final :: cfld
  end type cfl
  type, extends(cfl) :: cfde
   contains
  end type cfde
contains
  subroutine cfld(self)
    implicit none
    type(cfl), intent(inout) :: self    
    return
  end subroutine cfld
end module ct

$ gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/gcc-trunk/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/opt/gcc-trunk
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 4.9.0 20130808 (experimental) (GCC) 

$ gfortran -c bug.F90 -o bug.o
f951: internal compiler error: Segmentation fault
0x97d66f crash_signal
        ../../gcc-trunk/gcc/toplev.c:335
0x51dd10 generate_finalization_wrapper
        ../../gcc-trunk/gcc/fortran/class.c:1950
0x51dd10 gfc_find_derived_vtab(gfc_symbol*)
        ../../gcc-trunk/gcc/fortran/class.c:2398
0x51fc87 gfc_is_finalizable(gfc_symbol*, gfc_expr**)
        ../../gcc-trunk/gcc/fortran/class.c:2464
0x5954a7 resolve_fl_derived0
        ../../gcc-trunk/gcc/fortran/resolve.c:12368
0x594fcf resolve_fl_derived0
        ../../gcc-trunk/gcc/fortran/resolve.c:11992
0x594fcf resolve_fl_derived0
        ../../gcc-trunk/gcc/fortran/resolve.c:11980
0x59683f resolve_fl_derived0
        ../../gcc-trunk/gcc/fortran/resolve.c:12402
0x59683f resolve_fl_derived
        ../../gcc-trunk/gcc/fortran/resolve.c:12425
0x591559 resolve_symbol
        ../../gcc-trunk/gcc/fortran/resolve.c:12695
0x5a8133 do_traverse_symtree
        ../../gcc-trunk/gcc/fortran/symbol.c:3571
0x594582 resolve_types
        ../../gcc-trunk/gcc/fortran/resolve.c:14400
0x590430 gfc_resolve
        ../../gcc-trunk/gcc/fortran/resolve.c:14497
0x57d0af gfc_parse_file()
        ../../gcc-trunk/gcc/fortran/parse.c:4645
0x5b8ce5 gfc_be_parse_file
        ../../gcc-trunk/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

I can't currently test this with the most recent revision of gfortran due to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58350



More information about the Gcc-bugs mailing list