OSDN Git Service

PR debug/43329
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / used_types_12.f90
1 ! { dg-do compile }
2 ! Tests the fix PR29744, which is really a repeat of PR19362.
3 ! The problem came about because the test for PR19362 shifted
4 ! the fix to a subroutine, rather than the main program that
5 ! it originally occurred in.  Fixes for subsequent PRs introduced
6 ! a difference between the main program and a contained procedure
7 ! that resulted in the compiler going into an infinite loop.
8 !
9 ! Contributed by Harald Anlauf  <anlauf@gmx.de>
10 ! and originally by Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org> 
11 !
12 MODULE M
13   TYPE T0
14     SEQUENCE
15     INTEGER I
16   END TYPE
17 END
18
19 PROGRAM MAIN
20   USE M, T1 => T0
21   TYPE T0
22     SEQUENCE
23     INTEGER I
24   END TYPE
25   TYPE(T0) :: BAR
26   TYPE(T1) :: BAZ
27   BAZ = BAR
28 END
29 ! { dg-final { cleanup-modules "m" } }
30