http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55427
Bug #: 55427 Summary: ICE class pointer Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: valerywe...@hotmail.com Dear All Is that known? gcc version 4.8.0 20121121 (experimental) (GCC) Valery !>>>>>>> MODULE base_types IMPLICIT NONE TYPE :: base_type END TYPE base_type TYPE, extends( base_type ) :: integer_type integer :: i END TYPE integer_type contains FUNCTION points_to ( this ) RESULT( reslt ) CLASS( base_type ), DIMENSION( : ), TARGET :: this CLASS( base_type ), DIMENSION( : ), POINTER :: reslt reslt => this END FUNCTION points_to END MODULE base_types program bug use base_types implicit none CLASS( base_type ), POINTER, DIMENSION( : ) :: reslt CLASS( base_type ), ALLOCATABLE, DIMENSION( : ) :: val type(integer_type) :: i i%i=12345 ALLOCATE( val(10), source=i ) reslt => points_to ( val ) write(*,*) associated(reslt) select type( p=> reslt ) type is(integer_type) write(*,*) 'p=',p(2)%i class default stop 666 end select end program bug !========= gfortran-trunk bug4.f90 bug4.f90: In function ‘bug’: bug4.f90:24:0: internal compiler error: in fold_convert_loc, at fold-const.c:1857 reslt => points_to ( val ) ^ 0x83cb322 fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc-trunk/gcc/fold-const.c:1856 0x81eff63 gfc_trans_pointer_assignment(gfc_expr*, gfc_expr*) ../../gcc-trunk/gcc/fortran/trans-expr.c:6350 0x81f34a5 gfc_trans_class_assign(gfc_expr*, gfc_expr*, gfc_exec_op) ../../gcc-trunk/gcc/fortran/trans-expr.c:888 0x81b1dda trans_code ../../gcc-trunk/gcc/fortran/trans.c:1322 0x81dcf17 gfc_generate_function_code(gfc_namespace*) ../../gcc-trunk/gcc/fortran/trans-decl.c:5349 0x816f1c5 translate_all_program_units ../../gcc-trunk/gcc/fortran/parse.c:4467 0x816f1c5 gfc_parse_file() ../../gcc-trunk/gcc/fortran/parse.c:4681 0x81acbca gfc_be_parse_file ../../gcc-trunk/gcc/fortran/f95-lang.c:191 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. !<<<<<<<<<