AMDGPU: Allow f16/bf16 for DS_READ_TR16_B64 gfx950 builtins (#118297)
[llvm-project.git] / flang / test / Semantics / complex01.f90
blobf28ffe133604d90de9e83fac109964c9c2aa1ee5
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C718 Each named constant in a complex literal constant shall be of type
3 ! integer or real.
4 subroutine s()
5 integer :: ivar = 35
6 integer, parameter :: iconst = 35
7 real :: rvar = 68.9
8 real, parameter :: rconst = 68.9
9 character :: cvar = 'hello'
10 character, parameter :: cconst = 'hello'
11 logical :: lvar = .true.
12 logical, parameter :: lconst = .true.
13 complex :: cvar1 = (1, 1)
14 complex :: cvar2 = (1.0, 1.0)
15 complex :: cvar3 = (1.0, 1)
16 complex :: cvar4 = (1, 1.0)
17 complex :: cvar5 = (iconst, 1.0)
18 complex :: cvar6 = (iconst, rconst)
19 complex :: cvar7 = (rconst, iconst)
21 !ERROR: must be a constant
22 complex :: cvar8 = (ivar, 1.0)
23 !ERROR: must be a constant
24 !ERROR: must be a constant
25 complex :: cvar9 = (ivar, rvar)
26 !ERROR: must be a constant
27 !ERROR: must be a constant
28 complex :: cvar10 = (rvar, ivar)
29 !ERROR: operands must be INTEGER or REAL
30 complex :: cvar11 = (cconst, 1.0)
31 !ERROR: operands must be INTEGER or REAL
32 complex :: cvar12 = (lconst, 1.0)
33 end subroutine s