Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / used_types_24.f90
blob44d2f5ec1992087a7134f9bf9609156bca3fa5d5
1 ! { dg-do compile }
2 ! Tests the fix for PR37794 a regression where a bit of redundant code caused an ICE.
4 ! Contributed by Jonathan Hogg <J.Hogg@rl.ac.uk>
6 module m1
7 implicit none
9 type of01_data_private
10 real :: foo
11 end type of01_data_private
13 type of01_data
14 type (of01_data_private) :: private
15 end type of01_data
16 end module m1
18 module m2
19 implicit none
21 type of01_data_private
22 integer :: youngest
23 end type of01_data_private
24 end module m2
26 module test_mod
27 use m1, of01_rdata => of01_data
28 use m2, of01_idata => of01_data ! { dg-error "not found in module" }
30 implicit none
31 end module test_mod
33 ! { dg-final { cleanup-modules "m1 m2 test_mod" } }