aboutsummaryrefslogtreecommitdiff
blob: ff1f3ab93c2f9a87a9503bf658727ca7b75159b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
! RUN: %S/test_folding.sh %s %t %flang_fc1
! Test folding of isnan() extension
module m1
  logical, parameter :: results(*) = isnan([ &
    0., &
    -0., &
!WARN: division by zero
    1./0., &
!WARN: invalid argument on division
    0./0., &
    real(z'7ff80001',kind=4), &
    real(z'fff80001',kind=4), &
    real(z'7ffc0000',kind=4), &
    real(z'7ffe0000',kind=4) ])
  logical, parameter :: expected(*) = [ &
    .false., .false., .false., .true., .true., .true., .true., .true. ]
  logical, parameter :: test_isnan = all(results .eqv. expected)
end module