1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! C718 Each named constant in a complex literal constant shall be of type
7 integer, parameter :: iconst
= 35
9 real, parameter :: rconst
= 68.9
10 character :: cvar
= 'hello'
11 character, parameter :: cconst
= 'hello'
12 logical :: lvar
= .true
.
13 logical, parameter :: lconst
= .true
.
14 complex :: cvar1
= (1, 1)
15 complex :: cvar2
= (1.0, 1.0)
16 complex :: cvar3
= (1.0, 1)
17 complex :: cvar4
= (1, 1.0)
18 complex :: cvar5
= (iconst
, 1.0)
19 complex :: cvar6
= (iconst
, rconst
)
20 complex :: cvar7
= (rconst
, iconst
)
22 !ERROR: must be a constant
23 complex :: cvar8
= (ivar
, 1.0)
24 !ERROR: must be a constant
25 !ERROR: must be a constant
26 complex :: cvar9
= (ivar
, rvar
)
27 !ERROR: must be a constant
28 !ERROR: must be a constant
29 complex :: cvar10
= (rvar
, ivar
)
30 !ERROR: operands must be INTEGER or REAL
31 complex :: cvar11
= (cconst
, 1.0)
32 !ERROR: operands must be INTEGER or REAL
33 complex :: cvar12
= (lconst
, 1.0)