2017-02-20 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / used_types_12.f90
blobcc9870fb25b9cdb84f9a585c9ff1525a46eceb15
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.
9 ! Contributed by Harald Anlauf <anlauf@gmx.de>
10 ! and originally by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
12 MODULE M
13 TYPE T0
14 SEQUENCE
15 INTEGER I
16 END TYPE
17 END
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