Expected compile time error is not coming for Select type and Associate Construct
| Bugzilla Link | 47339 |
| Version | trunk |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @Sameeranjoshi,@jeanPerier,@kiranktp,@psteinfeld,@sscalpone |
Extended Description
Following test case should generate compile time error for invalid selector at line #4 and #9 :
R1105 selector is expr or variable C1103 (R1105) variable shall not be a coindexed object.
[root@localhost flang]# cat -n /root/LLVM/selecttype_coarray.f90 1 class(),allocatable :: calc[:] 2 integer :: icoa[] 3 4 associate(sel=>icoa[2]) 5 end associate 6 7 icoa = 2 8 allocate(integer::calc[*]) 9 select type(sel=>calc[2]) 10 type is(integer) 11 sel = 2 12 end select 13 end
Solution: I have modified resolve-names.cpp to add required checks. I will upload modified file/test case for review in differential once the bug is accepted.
This one appears to have been fixed by its reporter, Inderjeet Kalra, (thanks!) in https://reviews.llvm.org/D87073 .