Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/any_all_1.f90 @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do run } ! PR 34817 - the wrong library function was called, ! leading to garbage in the return value program main real, dimension(2,2) :: a logical(kind=4), dimension(2) :: b integer(kind=4), dimension(2) :: i equivalence (b,i) data a /1.0, 2.0, -0.1, -0.2 / i = 16843009 ! Initialize i to put junk into b b = any(a>0.5,dim=1) if (b(2) .or. .not. b(1)) STOP 1 i = 16843009 ! Initialize i to put junk into b b = all(a>0.5,dim=1) if (b(2) .or. .not. b(1)) STOP 2 end program main