URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [used_dummy_types_1.f90] - Rev 302
Compare with Previous | Blame | View Log
! { dg-do run }
! This checks the fix for PR20244 in which USE association
! of derived types would cause an ICE, if the derived type
! was also available by host association. This occurred
! because the backend declarations were different.
!
! Contributed by Paul Thomas <pault@gcc.gnu.org>
!==============
module mtyp
type t1
integer::a
end type t1
end module mtyp
!==============
module atest
use mtyp
type(t1)::ze
contains
subroutine test(ze_in )
use mtyp
implicit none
type(t1)::ze_in
ze_in = ze
end subroutine test
subroutine init( )
implicit none
ze = t1 (42)
end subroutine init
end module atest
!==============
use atest
type(t1) :: res = t1 (0)
call init ()
call test (res)
if (res%a.ne.42) call abort
end
! { dg-final { cleanup-modules "mtyp atest" } }