URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [used_types_2.f90] - Rev 165
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