[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / resolve95.f90
blob38103c34c3b543bb719b31d2257525cfb2ba3895
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Test SELECT TYPE and ASSOCIATE errors: C1103
5 subroutine s1()
6 class(*),allocatable :: calc[:]
7 integer,save :: icoa[*]
8 !ERROR: Selector must not be a coindexed object
9 associate(sel=>icoa[2])
10 end associate
11 icoa = 2
12 allocate(integer::calc[*])
13 !ERROR: Selector must not be a coindexed object
14 select type(sel=>calc[2])
15 end select
16 end subroutine