https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84007

            Bug ID: 84007
           Summary: ICE with same_type_as with CLASS entity
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

program foo

  logical,target :: a = .true.
  logical results

  class(*),pointer :: lp

  type my_type
     class(*),allocatable :: a
     class(*),pointer :: p
  end type my_type
  type(my_type) :: obj

  lp => a 
  obj%p => a

  results = same_type_as(lp, obj%p)

end program foo

internal compiler error: in wide_int_to_tree_1, at tree.c:1567
0x6bf112 wide_int_to_tree_1
        ../../gcc/gcc/tree.c:1567
0xf89658 wide_int_to_tree(tree_node*, poly_int<1u,
generic_wide_int<wide_int_ref_storage<false, true> > > const&)
        ../../gcc/gcc/tree.c:1692
0xf89658 build_int_cst(tree_node*, poly_int<1u, long>)
        ../../gcc/gcc/tree.c:1360
0x861a5a gfc_conv_same_type_as
        ../../gcc/gcc/fortran/trans-intrinsic.c:7761
0x8738cf gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        ../../gcc/gcc/fortran/trans-intrinsic.c:8781
0x84f25a gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/gcc/fortran/trans-expr.c:7863
0x857c46 gfc_trans_assignment_1
        ../../gcc/gcc/fortran/trans-expr.c:10039
0x815517 trans_code
        ../../gcc/gcc/fortran/trans.c:1828
0x840efd gfc_generate_function_code(gfc_namespace*)
        ../../gcc/gcc/fortran/trans-decl.c:6458
0x7cbb26 translate_all_program_units
        ../../gcc/gcc/fortran/parse.c:6103
0x7cbb26 gfc_parse_file()
        ../../gcc/gcc/fortran/parse.c:6306
0x811abf gfc_be_parse_file
        ../../gcc/gcc/fortran/f95-lang.c:204

Reply via email to