2 ! Tests the fix for PR30876 in which interface derived types were
3 ! not always being associated.
5 ! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
9 FUNCTION correct_input(i
)
10 INTEGER :: i
,correct_input(5), ans(5) = 0
11 IF (i
<1) correct_input
=test(1)
12 IF (i
>5) correct_input
=test(5)
13 END FUNCTION correct_input
15 RECURSIVE FUNCTION test(i
)
16 INTEGER :: test(5),i
,j
17 IF (i
<1 .OR
. i
>5) THEN
21 test(1:6-i
)=(/(j
,j
=i
,5)/)
30 IF (ANY(TEST(3).NE
.(/5,5,5,5,5/))) STOP 1
31 IF (ANY(TEST(6).NE
.(/0,0,0,0,0/))) STOP 2