https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64943
Bug ID: 64943 Summary: No error on ultimate allocatable components in IO list Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: pault at gcc dot gnu.org With this wrong code (other brand: Variables containing ultimate allocatable array components are forbidden from appearing directly in input/output lists. print *, TestReference([Test(99), Test(199)])): type :: Test integer :: i end type type :: TestReference class(Test), allocatable :: test(:) end type print *, TestReference([Test(99), Test(199)]) end 5.0 gives: f951: internal compiler error: Bad IO basetype (7) 0x62a1fb gfc_internal_error(char const*, ...) ../../trunk/gcc/fortran/error.c:1486 0x71738b transfer_expr ../../trunk/gcc/fortran/trans-io.c:2265 0x71724a transfer_expr ../../trunk/gcc/fortran/trans-io.c:2259 0x71ad25 gfc_trans_transfer(gfc_code*) ../../trunk/gcc/fortran/trans-io.c:2395 0x6ba7e7 trans_code ../../trunk/gcc/fortran/trans.c:1853 0x718790 build_dt ../../trunk/gcc/fortran/trans-io.c:1921 0x6ba807 trans_code ../../trunk/gcc/fortran/trans.c:1825 0x6e6008 gfc_generate_function_code(gfc_namespace*) ../../trunk/gcc/fortran/trans-decl.c:5842 0x6778c0 translate_all_program_units ../../trunk/gcc/fortran/parse.c:5341 0x6778c0 gfc_parse_file() ../../trunk/gcc/fortran/parse.c:5538 0x6b7675 gfc_be_parse_file ../../trunk/gcc/fortran/f95-lang.c:228