brintos

brintos / llvm-project-archived public Read only

0
0
Text · 545 B · f39989c Raw
16 lines · plain
1! RUN: %python %S/test_folding.py %s %flang_fc12! Tests folding of complex components3module m4  complex, parameter :: z = (1., 2.)5  logical, parameter :: test_1 = z%re == 1.6  logical, parameter :: test_2 = z%im == 2.7  logical, parameter :: test_3 = real(z+z) == 2.8  logical, parameter :: test_4 = aimag(z+z) == 4.9  type :: t10    complex :: z11  end type12  type(t), parameter :: tz(*) = [t((3., 4.)), t((5., 6.))]13  logical, parameter :: test_5 = all(tz%z%re == [3., 5.])14  logical, parameter :: test_6 = all(tz%z%im == [4., 6.])15end module16