1 ! RUN: %flang_fc1 -fdebug-unparse %s 2>&1 | FileCheck %s
2 ! Tests handling of easily-misparsed substrings and substring
3 ! type parameter inquiries.
5 integer, intent(in
) :: j
11 !CHECK: PRINT *, sc(1_8:int(j,kind=8))
13 !CHECK: PRINT *, ac(1_8)(1_8:int(j,kind=8))
15 !CHECK: PRINT *, st%sc(1_8:int(j,kind=8))
17 !CHECK: PRINT *, st%ac(1_8)(1_8:int(j,kind=8))
18 print *, st
%ac(1)(1:j
)
19 !CHECK: PRINT *, at(1_8)%sc(1_8:int(j,kind=8))
20 print *, at(1)%sc(1:j
)
21 !CHECK: PRINT *, at(1_8)%ac(1_8)(1_8:int(j,kind=8))
22 print *, at(1)%ac(1)(1:j
)
26 print *, ac(1)(1:j
)%kind
28 print *, st
%sc(1:j
)%kind
30 print *, st
%ac(1)(1:j
)%kind
32 print *, at(1)%sc(1:j
)%kind
34 print *, at(1)%ac(1)(1:j
)%kind
35 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
37 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
38 print *, ac(1)(1:j
)%len
39 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
40 print *, st
%sc(1:j
)%len
41 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
42 print *, st
%ac(1)(1:j
)%len
43 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
44 print *, at(1)%sc(1:j
)%len
45 !CHECK: PRINT *, int(max(0_8,int(j,kind=8)-1_8+1_8),kind=4)
46 print *, at(1)%ac(1)(1:j
)%len