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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-fwhole-file" }
3
!
4
! Tests the fix PR40011 comment 16 in which the derived type lists in
5
! different program units were getting mixed up.
6
!
7
! Contributed by Daniel Franck  
8
!
9
MODULE module_foo
10
  TYPE :: foo_node
11
    TYPE(foo_node_private), POINTER :: p
12
  END TYPE
13
 
14
  TYPE :: foo_node_private
15
    TYPE(foo_node), DIMENSION(-1:1) :: link
16
  END TYPE
17
 
18
  TYPE :: foo
19
    TYPE(foo_node) :: root
20
  END TYPE
21
END MODULE
22
 
23
FUNCTION foo_insert()
24
  USE module_foo, ONLY: foo, foo_node
25
 
26
  INTEGER :: foo_insert
27
  TYPE(foo_node) :: parent, current
28
  INTEGER :: cmp
29
 
30
  parent  = current
31
  current = current%p%link(cmp)
32
END FUNCTION
33
 
34
FUNCTION foo_count()
35
  USE module_foo, ONLY: foo
36
  INTEGER :: foo_count
37
END FUNCTION
38
 
39
! { dg-final { cleanup-modules "module_foo" } }

powered by: WebSVN 2.1.0

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