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

--- Comment #4 from anlauf at gcc dot gnu.org ---
The following variation (valid code) which compiles here with 14-branch
fails at r15-2937:

program p
  type t
!    integer, allocatable :: a(:)
     integer :: b
  end type
  class(t), allocatable :: x[:]
  select type (y => x)
  end select
end

% gfc-15 pr99837-zz.f90 -fcoarray=single
pr99837-zz.f90:1:9:

    1 | program p
      |         1
internal compiler error: in fold_convert_loc, at fold-const.cc:2768
0x24a75c6 internal_error(char const*, ...)
        ../../gcc-trunk/gcc/diagnostic-global-context.cc:491
0x97a1c2 fancy_abort(char const*, int, char const*)
        ../../gcc-trunk/gcc/diagnostic.cc:1772
0x7ab36c fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc-trunk/gcc/fold-const.cc:2768
0xb2ee7a trans_associate_var
        ../../gcc-trunk/gcc/fortran/trans-stmt.cc:2212
0xb33c81 gfc_trans_block_construct(gfc_code*)
        ../../gcc-trunk/gcc/fortran/trans-stmt.cc:2423
0xa8f537 trans_code
        ../../gcc-trunk/gcc/fortran/trans.cc:2463
0xac6964 gfc_generate_function_code(gfc_namespace*)
        ../../gcc-trunk/gcc/fortran/trans-decl.cc:7961
0xa3696f translate_all_program_units
        ../../gcc-trunk/gcc/fortran/parse.cc:7145
0xa3696f gfc_parse_file()
        ../../gcc-trunk/gcc/fortran/parse.cc:7459
0xa8c07f gfc_be_parse_file
        ../../gcc-trunk/gcc/fortran/f95-lang.cc:241

Reply via email to