http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60378
Bug ID: 60378 Summary: ICE on attempt to print null of derived type with unlimited polymorphic component Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: vladimir.fuka at gmail dot com type refptr class(*), allocatable :: data end type type(refptr),pointer :: x print *,null(mold=x) end gfortran null.f90 null.f90: In function ‘MAIN__’: null.f90:7:0: internal compiler error: Bad IO basetype (7) print *,null(mold=x) ^ 0x5e456b transfer_expr ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2185 0x5e4422 transfer_expr ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2179 0x5e76e5 gfc_trans_transfer(gfc_code*) ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:2312 0x5a7177 trans_code ../../gcc-4.8-20131003/gcc/fortran/trans.c:1625 0x5e55d7 build_dt ../../gcc-4.8-20131003/gcc/fortran/trans-io.c:1835 0x5a7197 trans_code ../../gcc-4.8-20131003/gcc/fortran/trans.c:1597 0x5c4812 gfc_generate_function_code(gfc_namespace*) ../../gcc-4.8-20131003/gcc/fortran/trans-decl.c:5397 0x568490 translate_all_program_units ../../gcc-4.8-20131003/gcc/fortran/parse.c:4474 0x568490 gfc_parse_file() ../../gcc-4.8-20131003/gcc/fortran/parse.c:4688 0x5a3845 gfc_be_parse_file ../../gcc-4.8-20131003/gcc/fortran/f95-lang.c:189 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.