Bug ID: 83146
           Summary: ICE on SELECT CASE statement with associate name
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot
          Reporter: neil.n.carlson at gmail dot com
  Target Milestone: ---

The current 8.0 trunk gives an ICE on the following example.  6.4.1 also gives
an ICE.

type foo
  integer n
end type
type bar
  type(foo) array(2)
end type
type(bar) b
associate (n_array => b%array%n)
  select case (n_array(1))
  case default
  end select
end associate

Here's the traceback

$ gfortran -c gfortran-20171124.f90 

   select case (n_array(1))

internal compiler error: in gfc_get_element_type, at fortran/trans-types.c:1231
0x5a5da8 gfc_get_element_type(tree_node*)
0x95d247 trans_associate_var
0x95d247 gfc_trans_block_construct(gfc_code*)
0x8e48c7 trans_code
0x90e7a8 gfc_generate_function_code(gfc_namespace*)
0x89d036 translate_all_program_units
0x89d036 gfc_parse_file()
0x8e0eaf gfc_be_parse_file

Reply via email to