Skip to content

Commit b6f9548

Browse files
committed
add test
1 parent 1698482 commit b6f9548

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
! RUN: %python %S/test_errors.py %s %flang_fc1
2+
type A (p, r)
3+
integer, kind :: p, r
4+
!ERROR: KIND parameter expression (int(selected_real_kind(six,twenty_three),kind=8)) of intrinsic type REAL did not resolve to a constant value
5+
real (selected_real_kind(p, r)) :: data
6+
end type
7+
integer :: six = 6, twenty_three = 23
8+
type(a(6,23)) :: a1
9+
!ERROR: Value of KIND type parameter 'p' must be constant
10+
!ERROR: Value of KIND type parameter 'r' must be constant
11+
!WARNING: specification expression refers to local object 'six' (initialized and saved) [-Wsaved-local-in-spec-expr]
12+
!WARNING: specification expression refers to local object 'twenty_three' (initialized and saved) [-Wsaved-local-in-spec-expr]
13+
type(a(six, twenty_three)) :: a2
14+
print *, a1%data%kind
15+
end

0 commit comments

Comments
 (0)