http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52994
--- Comment #4 from janus at gcc dot gnu.org 2012-04-15 19:32:22 UTC --- Just out of curiosity: Are you aware of any compiler which swallows this? Here is a slightly reduced test case, which gives the same ICE: module adv implicit none type adv_t contains procedure, nopass :: left_halo end type contains function left_halo (arr) real, intent(in), dimension(:), pointer :: arr real, dimension(:), pointer :: left_halo left_halo => arr(-1:-1) end function end module program test use adv implicit none real, dimension(:), pointer :: arr class(adv_t), allocatable :: a allocate(adv_t::a) allocate(arr(-1:5)) arr(-1) = 666 print*, a%left_halo(arr) a%left_halo(arr) = -666 ! ICE end program