URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc3/] [gcc/] [testsuite/] [gfortran.dg/] [used_types_2.f90] - Rev 581
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do compile }
! Tests the fix for PR28630, in which a contained,
! derived type function caused an ICE if its definition
! was both host and use associated.
!
! Contributed by Mark Hesselink <mhesseli@alumni.caltech.edu>
!
MODULE types
TYPE :: t
INTEGER :: i
END TYPE
END MODULE types
MODULE foo
USE types
CONTAINS
FUNCTION bar (x) RESULT(r)
USE types
REAL, INTENT(IN) :: x
TYPE(t) :: r
r = t(0)
END FUNCTION bar
END MODULE
LOGICAL FUNCTION foobar (x)
USE foo
REAL, INTENT(IN) :: x
TYPE(t) :: c
foobar = .FALSE.
c = bar (x)
END FUNCTION foobar
! { dg-final { cleanup-modules "types foo" } }
Go to most recent revision | Compare with Previous | Blame | View Log