[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Semantics / resolve95.f90
blobb3ddb2db470b656fec53e68cc7b4ebe9d9aafe05
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test SELECT TYPE and ASSOCIATE errors: C1103
4 subroutine s1()
5 class(*),allocatable :: calc[:]
6 integer,save :: icoa[*]
7 !ERROR: Selector must not be a coindexed object
8 associate(sel=>icoa[2])
9 end associate
10 icoa = 2
11 allocate(integer::calc[*])
12 !ERROR: Selector must not be a coindexed object
13 select type(sel=>calc[2])
14 end select
15 end subroutine