PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / used_dummy_types_1.f90
blob78abbc37e580932604e8fcb7e62390d678078768
1 ! { dg-do run }
2 ! This checks the fix for PR20244 in which USE association
3 ! of derived types would cause an ICE, if the derived type
4 ! was also available by host association. This occurred
5 ! because the backend declarations were different.
7 ! Contributed by Paul Thomas <pault@gcc.gnu.org>
8 !==============
9 module mtyp
10 type t1
11 integer::a
12 end type t1
13 end module mtyp
14 !==============
15 module atest
16 use mtyp
17 type(t1)::ze
18 contains
19 subroutine test(ze_in )
20 use mtyp
21 implicit none
22 type(t1)::ze_in
23 ze_in = ze
24 end subroutine test
25 subroutine init( )
26 implicit none
27 ze = t1 (42)
28 end subroutine init
29 end module atest
30 !==============
31 use atest
32 type(t1) :: res = t1 (0)
33 call init ()
34 call test (res)
35 if (res%a.ne.42) STOP 1
36 end