aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/used_types_24.f90
blob: 39eed6f2f01a0b2916d62d92b4f610cc2d5898d8 (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
29
30
31
! { dg-do compile }
! Tests the fix for PR37794 a regression where a bit of redundant code caused an ICE.
!
! Contributed by Jonathan Hogg  <J.Hogg@rl.ac.uk>
!
module m1
  implicit none

  type of01_data_private
    real :: foo
  end type of01_data_private

  type of01_data
    type (of01_data_private) :: private
  end type of01_data
end module m1

module m2
  implicit none

  type of01_data_private
    integer :: youngest
  end type of01_data_private
end module m2

module test_mod
  use m1, of01_rdata => of01_data
  use m2, of01_idata => of01_data ! { dg-error "not found in module" }

  implicit none
end module test_mod