view gcc/testsuite/gfortran.dg/select_type_45.f90 @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do compile }
!
! Tests the fix for PR80260
!
! Contributed by Damian Rouson  <damian@sourceryinstitute.org>
!
    type foo
    end type foo
    type, extends(foo) :: bar
    end type
contains
    subroutine f(x)
      class(foo) x(:,:)
      select type(x)
        class is (bar)
          call g(x(1,:))   ! ICEd here.
      end select
    end subroutine
    subroutine g(y)
      class(bar) y(:)
    end subroutine
end