[Bug fortran/83146] ICE on SELECT CASE statement with associate name

neil.n.carlson at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Nov 24 16:59:00 GMT 2017


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

--- Comment #1 from Neil Carlson <neil.n.carlson at gmail dot com> ---
I thought that assigning the select case expression to a temporary integer and
using that variable in the select case statement would be a workaround, but no.
You can put anything unrelated to the associate name in the select case and you
still get an ICE.  It seems the the associate block itself is the problem. 
Here's the tweaked example

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


More information about the Gcc-bugs mailing list