OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_dummy_types_1.f90] - Rev 823

Go to most recent revision | 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" } }

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.