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

            Bug ID: 60414
           Summary: internal compiler error: tree check
           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 testmod

    Type T
    contains
    procedure :: FWrite
    procedure :: FWriteArr
    generic :: Write => FWrite, FWriteArr
    end Type

    contains

    subroutine FWrite(this,X)
    class(T) this
    class(*) X

    end subroutine FWrite


    subroutine FWriteArr(this,X)
    class(T) this
    class(*) X(:)

    end subroutine FWriteARr

    subroutine WriteTextVector(aname, vec, n)
    character(LEN=*), intent(IN) :: aname
    integer, intent(in) :: n
    class(*), intent(in) :: vec(n)
    integer j
    Type(T) :: Tester

    j=1
    call Tester%Write(vec(j))

    end subroutine WriteTextVector

    end module


gfortran -c TestClass.f90
TestClass.f90: In function ‘writetextvector’:
TestClass.f90:33:0: internal compiler error: tree check: expected record_type
or union_type or qual_union_type, have pointer_type in gfc_class_data_get, at
fortran/trans-expr.c:125
     call Tester%Write(vec(j))
 ^
0x8809538 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
    ../../gcc-trunk/gcc/tree.c:9192
0x822c9a4 tree_check3
    ../../gcc-trunk/gcc/tree.h:2749
0x822c9a4 gfc_class_data_get(tree_node*)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:125
0x823633a gfc_conv_class_to_class(gfc_se*, gfc_expr*, gfc_typespec, bool, bool,
bool, bool)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:668
0x823318c gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
    ../../gcc-trunk/gcc/fortran/trans-expr.c:4258
0x825b86b gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
    ../../gcc-trunk/gcc/fortran/trans-stmt.c:408
0x8202064 trans_code
    ../../gcc-trunk/gcc/fortran/trans.c:1701
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,

Reply via email to