view gcc/testsuite/gfortran.dg/select_type_45.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +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