aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dependency_60.f90
blob: bf108122f3ebc460b4b608d105b6f092f7f9d6a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do run }
! PR 92755 - this used to cause an ICE (see dependency_57.f90)
! PR83118 - fixed so that it would run :-)
! Original test case by Gerhard Steinmetz
program p
   type t
     integer :: i
   end type
   type t2
      class(t), allocatable :: a(:)
   end type
   type(t2) :: z
   z%a = [t(1),t(2),t(3)]
   z%a = [z%a]
   select type (y => z%a)
     type is (t)
       if (any (y%i .ne. [1, 2, 3])) stop 1
   end select
end