36 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C718 Each named constant in a complex literal constant shall be of type3! integer or real.4subroutine s()5 integer :: ivar = 356 integer, parameter :: iconst = 357 real :: rvar = 68.98 real, parameter :: rconst = 68.99 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)20 21 !ERROR: must be a constant22 complex :: cvar8 = (ivar, 1.0)23 !ERROR: must be a constant24 !ERROR: must be a constant25 complex :: cvar9 = (ivar, rvar)26 !ERROR: must be a constant27 !ERROR: must be a constant28 complex :: cvar10 = (rvar, ivar)29 !ERROR: operands must be INTEGER, UNSIGNED, REAL, or BOZ30 complex :: cvar11 = (cconst, 1.0)31 !ERROR: operands must be INTEGER, UNSIGNED, REAL, or BOZ32 complex :: cvar12 = (lconst, 1.0)33 !ERROR: operands cannot both be BOZ34 complex :: cvar13 = (z'3f700000', z'00000000')35end subroutine s36