2 ! Tests the fix for PR34471 in which function KINDs that were
3 ! USE associated would cause an error.
5 ! This only needs to be run once.
8 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
11 integer, parameter :: i1
= 1, i2
= 2
15 integer, parameter :: i1
= 8
18 integer(i1
) function three()
20 use m2
! This provides the function kind
22 if(three
/= kind(three
)) call abort()
25 ! At one stage during the development of the patch, this started failing
26 ! but was not tested in gfortran.dg. */
27 real (kind(0d0)) function foo ()
28 foo
= real (kind (foo
))
34 integer(8) function three()
37 integer, parameter :: i1
= 4
42 if(three() /= 8) call abort()
43 if (int(foo()) /= 8) call abort ()
45 integer(i1
) function one() ! Host associated kind
46 if (kind(one
) /= 4) call abort()
49 integer(i1
) function two() ! Use associated kind
52 if (kind(two
) /= 8) call abort()