[Bug fortran/61767] New: ICE in generate_finalization_wrapper at fortran/class.c:1491
reubendb at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jul 10 03:24:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61767
Bug ID: 61767
Summary: ICE in generate_finalization_wrapper at
fortran/class.c:1491
Product: gcc
Version: 4.10.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: reubendb at gmail dot com
Hello,
My code generates ICE with gfortran from trunk. I've tried to reduce it as much
as possible. Here's the backtrace:
]$ gfortran -c Communicator_Form.f90
]$ gfortran -c Message_Template.f90
f951: internal compiler error: in generate_finalization_wrapper, at
fortran/class.c:1492
0x5578f3 generate_finalization_wrapper
../../gcc_trunk/gcc/fortran/class.c:1491
0x5578f3 gfc_find_derived_vtab(gfc_symbol*)
../../gcc_trunk/gcc/fortran/class.c:2326
0x5d1c74 resolve_fl_derived
../../gcc_trunk/gcc/fortran/resolve.c:12718
0x5cc807 resolve_symbol
../../gcc_trunk/gcc/fortran/resolve.c:12995
0x5e3b3b do_traverse_symtree
../../gcc_trunk/gcc/fortran/symbol.c:3630
0x5cf92c resolve_types
../../gcc_trunk/gcc/fortran/resolve.c:14739
0x5cb640 gfc_resolve(gfc_namespace*)
../../gcc_trunk/gcc/fortran/resolve.c:14840
0x5b6c26 gfc_parse_file()
../../gcc_trunk/gcc/fortran/parse.c:5083
0x5f57d5 gfc_be_parse_file
../../gcc_trunk/gcc/fortran/f95-lang.c:212
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.
]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gcc/4.10/libexec/gcc/x86_64-unknown-linux-gnu/4.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc_trunk/configure --prefix=/usr/local/gcc/4.10
--enable-languages=c,fortran,c++ --disable-multilib
Thread model: posix
gcc version 4.10.0 20140709 (experimental) (GCC)
"svn info" of the gcc source code shows Revision 212004. The two source code
that can be used to reproduce this issue are as follow:
]$ cat Communicator_Form.f90
module Communicator_Form
implicit none
private
type, public :: CommunicatorForm
contains
final :: &
Finalize
end type CommunicatorForm
contains
subroutine Finalize ( C )
type ( CommunicatorForm ), intent ( inout ) :: &
C
end subroutine Finalize
end module Communicator_Form
]$ cat Message_Template.f90
module Message_Template
use Communicator_Form
implicit none
private
type, public, abstract :: MessageTemplate
type ( CommunicatorForm ), pointer :: &
Communicator => null ( )
end type MessageTemplate
contains
subroutine InitializeTemplate ( M )
class ( MessageTemplate ), intent ( inout ), target :: &
M
end subroutine InitializeTemplate
end module Message_Template
Thank you for looking into this.
More information about the Gcc-bugs
mailing list