brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.8 KiB · d35174e Raw
50 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12! C701 The type-param-value for a kind type parameter shall be a constant3! expression.  This constraint looks like a mistake in the standard.4integer, parameter :: k = 85real, parameter :: l = 8.06integer :: n = 27!ERROR: Must be a constant value8parameter(m=n)9integer(k) :: x10! C713 A scalar-int-constant-name shall be a named constant of type integer.11!ERROR: Must have INTEGER type, but is REAL(4)12integer(l) :: y13!ERROR: Must be a constant value14integer(n) :: z15type t(k)16  integer, kind :: k17end type18!ERROR: Type parameter 'k' lacks a value and has no default19type(t( &20!ERROR: Must have INTEGER type, but is LOGICAL(4)21  .true.)) :: w22!ERROR: Must have INTEGER type, but is REAL(4)23real :: u(l*2)24!ERROR: Must have INTEGER type, but is REAL(4)25character(len=l) :: v26!ERROR: Value of named constant 'o' (o) cannot be computed as a constant value27real, parameter ::  o = o28!WARNING: INTEGER(4) division by zero [-Wfolding-exception]29!ERROR: Must be a constant value30integer, parameter ::  p = 0/031!WARNING: INTEGER(4) division by zero [-Wfolding-exception]32!ERROR: Must be a constant value33!WARNING: INTEGER(4) division by zero [-Wfolding-exception]34!WARNING: INTEGER(4) division by zero [-Wfolding-exception]35!WARNING: INTEGER(4) division by zero [-Wfolding-exception]36integer, parameter ::  q = 1+2*(1/0)37integer not_constant38!ERROR: Must be a constant value39integer, parameter :: s1 = not_constant/240!ERROR: Must be a constant value41integer, parameter :: s2 = 3/not_constant42!WARNING: INTEGER(4) division by zero [-Wfolding-exception]43!ERROR: Must be a constant value44integer(kind=2/0) r45integer, parameter :: sok(*)=[1,2]/[1,2]46!WARNING: INTEGER(4) division by zero [-Wfolding-exception]47!ERROR: Must be a constant value48integer, parameter :: snok(*)=[1,2]/[1,0]49end50