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

            Bug ID: 60495
           Summary: ICE: in fold_convert_loc, at fold-const.c:1994
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info

module A
    implicit none

    Type T
    contains
    final :: testfree
    end type

    Type, extends(T) :: T2
        real, allocatable :: Y(:)
        class(T), allocatable :: XX
    contains
    end type

    contains

    subroutine testfree(this)
    Type(T) this
    end subroutine

    subroutine Testf()
    Type(T2) A, B

        B=A
    end subroutine

    end module

TestClass.f90: In function ‘testf’:
TestClass.f90:26:0: internal compiler error: in fold_convert_loc, at
fold-const.c:1994
         B=A
 ^
0x83f3a5a fold_convert_loc(unsigned int, tree_node*, tree_node*)
    ../../gcc-trunk/gcc/fold-const.c:1993
0x8205f01 gfc_conv_descriptor_data_set(stmtblock_t*, tree_node*, tree_node*)
    ../../gcc-trunk/gcc/fortran/trans-array.c:178
0x822c5d2 gfc_conv_scalar_to_descriptor(gfc_se*, tree_node*, symbol_attribute)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:74
0x820254d gfc_add_comp_finalizer_call(stmtblock_t*, tree_node*, gfc_component*,
bool)
    ../../gcc-trunk/gcc/fortran/trans.c:1012
0x820f7d5 structure_alloc_comps
    ../../gcc-trunk/gcc/fortran/trans-array.c:7622
0x822fd85 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool,
bool)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:6955
0x823acd0 gfc_trans_assignment_1
    ../../gcc-trunk/gcc/fortran/trans-expr.c:7999
0x823e0d5 gfc_trans_assign(gfc_code*)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:8170
0x8201ffd trans_code
    ../../gcc-trunk/gcc/fortran/trans.c:1623
0x8229920 gfc_generate_function_code(gfc_namespace*)
    ../../gcc-trunk/gcc/fortran/trans-decl.c:5610
0x82036f2 gfc_generate_module_code(gfc_namespace*)
    ../../gcc-trunk/gcc/fortran/trans.c:1956
0x81c0df6 translate_all_program_units
    ../../gcc-trunk/gcc/fortran/parse.c:4523
0x81c0df6 gfc_parse_file()
    ../../gcc-trunk/gcc/fortran/parse.c:4733
0x81fd035 gfc_be_parse_file
    ../../gcc-trunk/gcc/fortran/f95-lang.c:188
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to