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

PROGRAM MAIN
  USE M, T1 => T0
  TYPE T0
    SEQUENCE
    INTEGER I
  END TYPE
  TYPE(T0) :: BAR
  TYPE(T1) :: BAZ
  BAZ = BAR
END