PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / array_constructor_50.f90
blob843031fa37086025f68fd7e85434c987dbeef369
1 ! { dg-do run }
2 ! PR 71795 - wrong result when putting an array constructor
3 ! instide an iterator.
4 program test
6 implicit none
7 integer :: i,n
8 logical, dimension(1) :: ra
9 logical :: rs
10 integer, allocatable :: a(:)
12 allocate ( a(1) )
14 n = 1
15 a = 2
17 ra = (/ (any(a(i).eq.(/1,2,3/)) ,i=1,n) /)
18 if (.not. all(ra)) STOP 1
19 rs = any ( (/ (any(a(i).eq.(/1,2,3/)) ,i=1,n) /) )
20 if (.not. rs) STOP 2
21 end program test