modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / module_function_type_1.f90
blob793205cf59910094f727de2cfd8535673ccac3b0
1 ! { dg-do compile }
2 ! This checks the fix for PR33295 in which the A_type in initA was
3 ! not promoted to module level and so not recognised as being the
4 ! same as that emanating directly from module a.
6 ! Contributed by Janus Weil <jaydub66@gmail.com>
8 module A
9 type A_type
10 real comp
11 end type
12 end module A
14 module B
15 contains
16 function initA()
17 use A
18 implicit none
19 type(A_type):: initA
20 initA%comp=1.0
21 end function
22 end module B
24 program C
25 use B
26 use A
27 implicit none
28 type(A_type):: A_var
29 A_var = initA()
30 end program C