[JITLink][arm64] Support arm64e JIT'd code (initially enabled for MachO only).
[llvm-project.git] / flang / test / Evaluate / fold-re-im.f90
blobf39989cdf973b6af49ef588c7610415128e0f0d0
1 ! RUN: %python %S/test_folding.py %s %flang_fc1
2 ! Tests folding of complex components
3 module m
4 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 :: t
10 complex :: z
11 end type
12 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.])
15 end module