brintos

brintos / llvm-project-archived public Read only

0
0
Text · 767 B · 8e1b6ff Raw
18 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Tests folding of DIM()3module m4  logical, parameter :: test_i1 = dim(0, 0) == 05  logical, parameter :: test_i2 = dim(1, 2) == 06  logical, parameter :: test_i3 = dim(2, 1) == 17  logical, parameter :: test_i4 = dim(2, -1) == 38  logical, parameter :: test_i5 = dim(-1, 2) == 09  logical, parameter :: test_a1 = dim(0., 0.) == 0.10  logical, parameter :: test_a2 = dim(1., 2.) == 0.11  logical, parameter :: test_a3 = dim(2., 1.) == 1.12  logical, parameter :: test_a4 = dim(2., -1.) == 3.13  logical, parameter :: test_a5 = dim(-1., 2.) == 0.14  !WARN: warning: invalid argument on division [-Wfolding-exception]15  real, parameter :: nan = 0./0.16  logical, parameter :: test_a6 = dim(nan, 1.) /= dim(nan, 1.)17end module18