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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [used_types_2.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR28630, in which a contained,
3
! derived type function caused an ICE if its definition
4
! was both host and use associated.
5
!
6
! Contributed by Mark Hesselink 
7
!
8
MODULE types
9
   TYPE :: t
10
      INTEGER :: i
11
   END TYPE
12
END MODULE types
13
 
14
MODULE foo
15
   USE types
16
CONTAINS
17
   FUNCTION bar (x) RESULT(r)
18
      USE types
19
      REAL, INTENT(IN) :: x
20
      TYPE(t) :: r
21
      r = t(0)
22
   END FUNCTION bar
23
END MODULE
24
 
25
 
26
LOGICAL FUNCTION foobar (x)
27
   USE foo
28
   REAL, INTENT(IN) :: x
29
   TYPE(t) :: c
30
   foobar = .FALSE.
31
   c = bar (x)
32
END FUNCTION foobar
33
! { dg-final { cleanup-modules "types foo" } }
34
 

powered by: WebSVN 2.1.0

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