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

            Bug ID: 93813
           Summary: [8/9/10 Regression] ICE in
                    gfc_trans_select_type_cases, at
                    fortran/trans-stmt.c:2874
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started to ICE with gfortran-7 :
(r10 compiles with "associate (y => x)")


$ cat z1.f90
program p
   type t
   end type
   type, extends(t) :: t2
   end type
   class(t), allocatable :: x
   associate (y => (x))
      select type (y)
      type is (t2)
      end select
   end associate
end


$ gfortran-6 -c z1.f90
$
$ gfortran-10-20200216 -c z1.f90
z1.f90:8:0:

    8 |       select type (y)
      |
internal compiler error: Segmentation fault
0xbae76f crash_signal
        ../../gcc/toplev.c:328
0x76cafe gfc_trans_select_type_cases
        ../../gcc/fortran/trans-stmt.c:2874
0x76cafe gfc_trans_select_type(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:3622
0x6f7c67 trans_code
        ../../gcc/fortran/trans.c:1980
0x76b81f gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2276
0x6f7bd7 trans_code
        ../../gcc/fortran/trans.c:1960
0x7210a4 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6835
0x6a9ec6 translate_all_program_units
        ../../gcc/fortran/parse.c:6306
0x6a9ec6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6545
0x6f44ff gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

Reply via email to