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