1 ! RUN: %flang_fc1 -fsyntax-only -pedantic %s 2>&1 | FileCheck %s
2 ! Ensure that EOSHIFT's ARRAY= argument and result can be CLASS(*).
4 ! CHECK: warning: Source of TRANSFER is polymorphic
5 ! CHECK: warning: Mold of TRANSFER is polymorphic
10 type, extends(base
) :: extended
13 class(base
), allocatable
:: polyArray(:,:,:)
14 class(*), allocatable
:: unlimited(:)
15 allocate(polyArray
, source
=reshape([(extended(n
,n
-1),n
=1,8)],[2,2,2]))
16 allocate(unlimited
, source
=[(base(9),n
=1,16)])
17 select
type (x
=> eoshift(transfer(polyArray
, unlimited
), -4, base(-1)))
18 type is (base
); print *, 'base', x
19 type is (extended
); print *, 'extended?', x
20 class default
; print *, 'class default??'