https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64381
Bug ID: 64381 Summary: ICE with initialization of procedure pointer in type Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: valeryweber at hotmail dot com Dear All the following code is producing an ICE with gcc 4.9.2. v cat gcc-4.9.2.f90 MODULE distribution_types_ IMPLICIT NONE ABSTRACT INTERFACE FUNCTION dist_map_proc_to_blk_raw_list_func ( ) RESULT( list ) INTEGER, DIMENSION(:,:), ALLOCATABLE :: list END FUNCTION dist_map_proc_to_blk_raw_list_func END INTERFACE TYPE, PUBLIC :: sm_type INTEGER, DIMENSION( : ), ALLOCATABLE :: proc_grid PROCEDURE( dist_map_proc_to_blk_raw_list_func ), NOPASS, POINTER :: map_proc_to_blk_raw_list => NULL( ) END TYPE sm_type CONTAINS SUBROUTINE sm_multiply ( ) TYPE(sm_type), ALLOCATABLE, DIMENSION(:) :: matrices_a ALLOCATE( matrices_a( 3 ) ) END SUBROUTINE sm_multiply END MODULE distribution_types_ gfortran-4.9.2 -c gcc-4.9.2.f90 gcc-4.9.2.f90: In function ‘sm_multiply’: gcc-4.9.2.f90:15:0: internal compiler error: in gfc_conv_descriptor_data_set, at fortran/trans-array.c:171 ALLOCATE( matrices_a( 3 ) ) ^ 0x5ebd56 gfc_conv_descriptor_data_set ../../gcc-4.9.2/gcc/fortran/trans-array.c:171 0x5ebd56 gfc_conv_descriptor_data_set(stmtblock_t*, tree_node*, tree_node*) ../../gcc-4.9.2/gcc/fortran/trans-array.c:166 0x5f370d structure_alloc_comps ../../gcc-4.9.2/gcc/fortran/trans-array.c:7785 0x5f305f structure_alloc_comps ../../gcc-4.9.2/gcc/fortran/trans-array.c:7646 0x5f4546 gfc_array_allocate(gfc_se*, gfc_expr*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, gfc_expr*, gfc_typespec*) ../../gcc-4.9.2/gcc/fortran/trans-array.c:5322 0x63c159 gfc_trans_allocate(gfc_code*) ../../gcc-4.9.2/gcc/fortran/trans-stmt.c:4952 0x5e8907 trans_code ../../gcc-4.9.2/gcc/fortran/trans.c:1794 0x6081f2 gfc_generate_function_code(gfc_namespace*) ../../gcc-4.9.2/gcc/fortran/trans-decl.c:5653 0x5e9e41 gfc_generate_module_code(gfc_namespace*) ../../gcc-4.9.2/gcc/fortran/trans.c:1995 0x5a7b60 translate_all_program_units ../../gcc-4.9.2/gcc/fortran/parse.c:4940 0x5a7b60 gfc_parse_file() ../../gcc-4.9.2/gcc/fortran/parse.c:5150 0x5e4be5 gfc_be_parse_file ../../gcc-4.9.2/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.