2 ! Tests the fix for PR31229, PR31154 and PR33334, in which
3 ! the KIND and TYPE parameters in the function declarations
6 ! Contributed by Brooks Moses <brooks@gcc.gnu.org>
7 ! and Tobias Burnus <burnus@gcc.gnu.org>
11 integer, parameter :: dp
= selected_real_kind(6)
22 type(t
) function func() ! The legal bit of PR33334
27 real(dp
) function another_dp_before_defined ()
29 another_dp_before_defined
= real (kind (4.0_DP
))
34 REAL(2*DP
) function declared_dp_before_defined()
37 declared_dp_before_defined
= 1.0_dp
39 declared_dp_before_defined
= real (kind (x
))
45 type(t
), external :: func
47 if (kind (y ()) .ne
. 4) STOP 1
48 if (kind (declared_dp_before_defined ()) .ne
. 8) STOP 2
49 if (int (declared_dp_before_defined ()) .ne
. 4) STOP 3
50 if (int (another_dp_before_defined ()) .ne
. 4) STOP 4
52 if (z
%i
.ne
. 5) STOP 5