[Bug fortran/69011] New: [OOP] ICE in gfc_advance_chain for ALLOCATE with SOURCE
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 22 11:41:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69011
Bug ID: 69011
Summary: [OOP] ICE in gfc_advance_chain for ALLOCATE with
SOURCE
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
This is a cut-down version of an ICE in FOODIE
( https://github.com/Fortran-FOSS-Programmers/FOODiE ).
Might be related to PR 51864, but the error message is different.
ig25@linux-fd1f:~/Advance> cat testcase.f90
module foodie_adt_integrand
implicit none
private
public :: integrand
type, abstract :: integrand
contains
endtype integrand
abstract interface
endinterface
endmodule foodie_adt_integrand
module foodie_integrator_adams_moulton
use foodie_adt_integrand, only : integrand
implicit none
integer, parameter :: R_P = 4, I_P = 4
private
public :: adams_moulton_integrator
type :: adams_moulton_integrator
private
integer(I_P) :: steps=-1 !< Number of time steps.
real(R_P), allocatable :: b(:) !< \(b\) coefficients.
contains
procedure, pass(self), public :: integrate !< Integrate integrand field.
endtype adams_moulton_integrator
contains
subroutine integrate(self, previous)
class(integrand), intent(INOUT) :: previous(1:) !< Previous time steps
solutions of integrand field.
class(adams_moulton_integrator), intent(IN) :: self !< Actual AB integrator.
class(integrand), allocatable :: delta !< Delta RHS for fixex point
iterations.
allocate(delta, source=previous(self%steps))
return
endsubroutine integrate
endmodule foodie_integrator_adams_moulton
ig25@linux-fd1f:~/Advance> gfortran -c testcase.f90
testcase.f90:36:0:
allocate(delta, source=previous(self%steps))
internal compiler error: in gfc_advance_chain, bei fortran/trans.c:58
0x6e67fb gfc_advance_chain(tree_node*, int)
../../trunk/gcc/fortran/trans.c:58
0x719faf gfc_class_vptr_get(tree_node*)
../../trunk/gcc/fortran/trans-expr.c:149
0x71e795 class_vtab_field_get
../../trunk/gcc/fortran/trans-expr.c:199
0x71e795 gfc_class_vtab_copy_get(tree_node*)
../../trunk/gcc/fortran/trans-expr.c:221
0x71e795 gfc_copy_class_to_class(tree_node*, tree_node*, tree_node*, bool)
../../trunk/gcc/fortran/trans-expr.c:1092
0x76c1e2 gfc_trans_allocate(gfc_code*)
../../trunk/gcc/fortran/trans-stmt.c:5979
0x6e6df7 trans_code
../../trunk/gcc/fortran/trans.c:1836
0x7158c8 gfc_generate_function_code(gfc_namespace*)
../../trunk/gcc/fortran/trans-decl.c:6083
0x6eb4b1 gfc_generate_module_code(gfc_namespace*)
../../trunk/gcc/fortran/trans.c:2054
0x6a1f3d translate_all_program_units
../../trunk/gcc/fortran/parse.c:5599
0x6a1f3d gfc_parse_file()
../../trunk/gcc/fortran/parse.c:5818
0x6e3b62 gfc_be_parse_file
../../trunk/gcc/fortran/f95-lang.c:201
Bitte senden Sie einen vollständigen Fehlerbericht auf Englisch ein;
inclusive vorverarbeitetem Quellcode, wenn es dienlich ist.
Please include the complete backtrace with any bug report.
Siehe <http://gcc.gnu.org/bugs.html> für nähere Anweisungen.
The failed assertion is
#1 0x00000000006e67fc in gfc_advance_chain (t=<optimized out>, n=<optimized
out>, n@entry=1) at ../../trunk/gcc/fortran/trans.c:58
58 gcc_assert (t != NULL_TREE);
More information about the Gcc-bugs
mailing list