Debian Codegraph @

gcc/testsuite/gfortran.dg/array_constructor_50.f90

raw
1 ! { dg-do run }
2 ! PR 71795 - wrong result when putting an array constructor
3 ! instide an iterator.
4 program test
5
6 implicit none
7 integer :: i,n
8 logical, dimension(1) :: ra
9 logical :: rs
10 integer, allocatable :: a(:)
11
12 allocate ( a(1) )
13
14 n = 1
15 a = 2
16
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