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



--- Comment #9 from janus at gcc dot gnu.org 2013-01-10 16:06:51 UTC ---

In fact one also gets an ICE when replacing "class(S)" with "type(S)" in

comment 8 (already with an unpatched gfortran):





  type :: S

    integer :: n

  end type

  type(S) :: Sobj



  type :: T

    type(S), allocatable :: x

  end type



  Sobj = S(1)

  call pass_it (T(Sobj))



contains



  subroutine pass_it (foo)

    type(T) :: foo

  end subroutine



end







internal compiler error: in fold_convert_loc, at fold-const.c:1864

   call pass_it (T(Sobj))

 ^

0x844efe fold_convert_loc(unsigned int, tree_node*, tree_node*)

        /home/jweil/gcc48/trunk/gcc/fold-const.c:1863

0x671aa9 gfc_trans_subcomponent_assign

        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:6001

0x671e10 gfc_trans_structure_assign

        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:6068

0x671f46 gfc_conv_structure(gfc_se*, gfc_expr*, int)

        /home/jweil/gcc48/trunk/gcc/fortran/trans-expr.c:6095





This is similar, but not identical, to the ICE in comment 8.

Reply via email to